diff options
| author | orivej <[email protected]> | 2022-02-10 16:44:49 +0300 |
|---|---|---|
| committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:44:49 +0300 |
| commit | 718c552901d703c502ccbefdfc3c9028d608b947 (patch) | |
| tree | 46534a98bbefcd7b1f3faa5b52c138ab27db75b7 /contrib/python/Pygments/py2/pygments/plugin.py | |
| parent | e9656aae26e0358d5378e5b63dcac5c8dbe0e4d0 (diff) | |
Restoring authorship annotation for <[email protected]>. Commit 1 of 2.
Diffstat (limited to 'contrib/python/Pygments/py2/pygments/plugin.py')
| -rw-r--r-- | contrib/python/Pygments/py2/pygments/plugin.py | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/contrib/python/Pygments/py2/pygments/plugin.py b/contrib/python/Pygments/py2/pygments/plugin.py index 3d185efc108..ce2a44aa46e 100644 --- a/contrib/python/Pygments/py2/pygments/plugin.py +++ b/contrib/python/Pygments/py2/pygments/plugin.py @@ -32,7 +32,7 @@ yourfilter = yourfilter:YourFilter - :copyright: Copyright 2006-2019 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2019 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ LEXER_ENTRY_POINT = 'pygments.lexers' @@ -41,30 +41,30 @@ STYLE_ENTRY_POINT = 'pygments.styles' FILTER_ENTRY_POINT = 'pygments.filters' -def iter_entry_points(group_name): - try: - import pkg_resources - except (ImportError, IOError): - return [] - - return pkg_resources.iter_entry_points(group_name) - - +def iter_entry_points(group_name): + try: + import pkg_resources + except (ImportError, IOError): + return [] + + return pkg_resources.iter_entry_points(group_name) + + def find_plugin_lexers(): - for entrypoint in iter_entry_points(LEXER_ENTRY_POINT): + for entrypoint in iter_entry_points(LEXER_ENTRY_POINT): yield entrypoint.load() def find_plugin_formatters(): - for entrypoint in iter_entry_points(FORMATTER_ENTRY_POINT): + for entrypoint in iter_entry_points(FORMATTER_ENTRY_POINT): yield entrypoint.name, entrypoint.load() def find_plugin_styles(): - for entrypoint in iter_entry_points(STYLE_ENTRY_POINT): + for entrypoint in iter_entry_points(STYLE_ENTRY_POINT): yield entrypoint.name, entrypoint.load() def find_plugin_filters(): - for entrypoint in iter_entry_points(FILTER_ENTRY_POINT): + for entrypoint in iter_entry_points(FILTER_ENTRY_POINT): yield entrypoint.name, entrypoint.load() |
