diff options
author | ilezhankin <ilezhankin@yandex-team.ru> | 2022-02-10 16:45:55 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:55 +0300 |
commit | 1d125034f06575234f83f24f08677955133f140e (patch) | |
tree | ec05fbbd61dc118d5de37f206ab978cff58774bd /contrib/python/Pygments/py2/pygments/plugin.py | |
parent | 3a7a498715ef1b66f5054455421b845e45e3a653 (diff) | |
download | ydb-1d125034f06575234f83f24f08677955133f140e.tar.gz |
Restoring authorship annotation for <ilezhankin@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/python/Pygments/py2/pygments/plugin.py')
-rw-r--r-- | contrib/python/Pygments/py2/pygments/plugin.py | 112 |
1 files changed, 56 insertions, 56 deletions
diff --git a/contrib/python/Pygments/py2/pygments/plugin.py b/contrib/python/Pygments/py2/pygments/plugin.py index 3d185efc10..22c848bd22 100644 --- a/contrib/python/Pygments/py2/pygments/plugin.py +++ b/contrib/python/Pygments/py2/pygments/plugin.py @@ -1,46 +1,46 @@ -# -*- coding: utf-8 -*- -""" - pygments.plugin - ~~~~~~~~~~~~~~~ - - Pygments setuptools plugin interface. The methods defined - here also work if setuptools isn't installed but they just - return nothing. - - lexer plugins:: - - [pygments.lexers] - yourlexer = yourmodule:YourLexer - - formatter plugins:: - - [pygments.formatters] - yourformatter = yourformatter:YourFormatter - /.ext = yourformatter:YourFormatter - - As you can see, you can define extensions for the formatter - with a leading slash. - - syntax plugins:: - - [pygments.styles] - yourstyle = yourstyle:YourStyle - - filter plugin:: - - [pygments.filter] - yourfilter = yourfilter:YourFilter - - +# -*- coding: utf-8 -*- +""" + pygments.plugin + ~~~~~~~~~~~~~~~ + + Pygments setuptools plugin interface. The methods defined + here also work if setuptools isn't installed but they just + return nothing. + + lexer plugins:: + + [pygments.lexers] + yourlexer = yourmodule:YourLexer + + formatter plugins:: + + [pygments.formatters] + yourformatter = yourformatter:YourFormatter + /.ext = yourformatter:YourFormatter + + As you can see, you can define extensions for the formatter + with a leading slash. + + syntax plugins:: + + [pygments.styles] + yourstyle = yourstyle:YourStyle + + filter plugin:: + + [pygments.filter] + yourfilter = yourfilter:YourFilter + + :copyright: Copyright 2006-2019 by the Pygments team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" -LEXER_ENTRY_POINT = 'pygments.lexers' -FORMATTER_ENTRY_POINT = 'pygments.formatters' -STYLE_ENTRY_POINT = 'pygments.styles' -FILTER_ENTRY_POINT = 'pygments.filters' - - + :license: BSD, see LICENSE for details. +""" +LEXER_ENTRY_POINT = 'pygments.lexers' +FORMATTER_ENTRY_POINT = 'pygments.formatters' +STYLE_ENTRY_POINT = 'pygments.styles' +FILTER_ENTRY_POINT = 'pygments.filters' + + def iter_entry_points(group_name): try: import pkg_resources @@ -50,21 +50,21 @@ def iter_entry_points(group_name): return pkg_resources.iter_entry_points(group_name) -def find_plugin_lexers(): +def find_plugin_lexers(): for entrypoint in iter_entry_points(LEXER_ENTRY_POINT): - yield entrypoint.load() - - -def find_plugin_formatters(): + yield entrypoint.load() + + +def find_plugin_formatters(): for entrypoint in iter_entry_points(FORMATTER_ENTRY_POINT): - yield entrypoint.name, entrypoint.load() - - -def find_plugin_styles(): + yield entrypoint.name, entrypoint.load() + + +def find_plugin_styles(): for entrypoint in iter_entry_points(STYLE_ENTRY_POINT): - yield entrypoint.name, entrypoint.load() - - -def find_plugin_filters(): + yield entrypoint.name, entrypoint.load() + + +def find_plugin_filters(): for entrypoint in iter_entry_points(FILTER_ENTRY_POINT): - yield entrypoint.name, entrypoint.load() + yield entrypoint.name, entrypoint.load() |