aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/Pygments/py2/pygments/lexers/__init__.py
diff options
context:
space:
mode:
authorshadchin <shadchin@yandex-team.ru>2022-02-10 16:44:39 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:44:39 +0300
commite9656aae26e0358d5378e5b63dcac5c8dbe0e4d0 (patch)
tree64175d5cadab313b3e7039ebaa06c5bc3295e274 /contrib/python/Pygments/py2/pygments/lexers/__init__.py
parent2598ef1d0aee359b4b6d5fdd1758916d5907d04f (diff)
downloadydb-e9656aae26e0358d5378e5b63dcac5c8dbe0e4d0.tar.gz
Restoring authorship annotation for <shadchin@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/python/Pygments/py2/pygments/lexers/__init__.py')
-rw-r--r--contrib/python/Pygments/py2/pygments/lexers/__init__.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/contrib/python/Pygments/py2/pygments/lexers/__init__.py b/contrib/python/Pygments/py2/pygments/lexers/__init__.py
index 3443573b6d..100d807660 100644
--- a/contrib/python/Pygments/py2/pygments/lexers/__init__.py
+++ b/contrib/python/Pygments/py2/pygments/lexers/__init__.py
@@ -20,13 +20,13 @@ from pygments.modeline import get_filetype_from_buffer
from pygments.plugin import find_plugin_lexers
from pygments.util import ClassNotFound, itervalues, guess_decode, text_type
-COMPAT = {
- 'Python3Lexer': 'PythonLexer',
- 'Python3TracebackLexer': 'PythonTracebackLexer',
-}
+COMPAT = {
+ 'Python3Lexer': 'PythonLexer',
+ 'Python3TracebackLexer': 'PythonTracebackLexer',
+}
__all__ = ['get_lexer_by_name', 'get_lexer_for_filename', 'find_lexer_class',
- 'guess_lexer', 'load_lexer_from_file'] + list(LEXERS) + list(COMPAT)
+ 'guess_lexer', 'load_lexer_from_file'] + list(LEXERS) + list(COMPAT)
_lexer_cache = {}
_pattern_cache = {}
@@ -147,8 +147,8 @@ def load_lexer_from_file(filename, lexername="CustomLexer", **options):
# And finally instantiate it with the options
return lexer_class(**options)
except IOError as err:
- raise ClassNotFound('cannot read %s: %s' % (filename, err))
- except ClassNotFound:
+ raise ClassNotFound('cannot read %s: %s' % (filename, err))
+ except ClassNotFound:
raise
except Exception as err:
raise ClassNotFound('error when loading custom lexer: %s' % err)
@@ -331,8 +331,8 @@ class _automodule(types.ModuleType):
cls = _lexer_cache[info[1]]
setattr(self, name, cls)
return cls
- if name in COMPAT:
- return getattr(self, COMPAT[name])
+ if name in COMPAT:
+ return getattr(self, COMPAT[name])
raise AttributeError(name)