diff options
author | Nikita Slyusarev <nslus@yandex-team.com> | 2022-02-10 16:46:52 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:52 +0300 |
commit | cd77cecfc03a3eaf87816af28a33067c4f0cdb59 (patch) | |
tree | 1308e0bae862d52e0020d881fe758080437fe389 /contrib/python/ipython/py2/IPython/lib/lexers.py | |
parent | cdae02d225fb5b3afbb28990e79a7ac6c9125327 (diff) | |
download | ydb-cd77cecfc03a3eaf87816af28a33067c4f0cdb59.tar.gz |
Restoring authorship annotation for Nikita Slyusarev <nslus@yandex-team.com>. Commit 1 of 2.
Diffstat (limited to 'contrib/python/ipython/py2/IPython/lib/lexers.py')
-rw-r--r-- | contrib/python/ipython/py2/IPython/lib/lexers.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/contrib/python/ipython/py2/IPython/lib/lexers.py b/contrib/python/ipython/py2/IPython/lib/lexers.py index 9160ae1245..1b81e3db61 100644 --- a/contrib/python/ipython/py2/IPython/lib/lexers.py +++ b/contrib/python/ipython/py2/IPython/lib/lexers.py @@ -44,7 +44,7 @@ from pygments.lexer import ( Lexer, DelegatingLexer, RegexLexer, do_insertions, bygroups, using, ) from pygments.token import ( - Generic, Keyword, Literal, Name, Operator, Other, Text, Error, + Generic, Keyword, Literal, Name, Operator, Other, Text, Error, ) from pygments.util import get_bool_opt @@ -235,13 +235,13 @@ class IPythonConsoleLexer(Lexer): # The regexps used to determine what is input and what is output. # The default prompts for IPython are: # - # in = 'In [#]: ' - # continuation = ' .D.: ' - # template = 'Out[#]: ' - # - # Where '#' is the 'prompt number' or 'execution count' and 'D' - # D is a number of dots matching the width of the execution count + # in = 'In [#]: ' + # continuation = ' .D.: ' + # template = 'Out[#]: ' # + # Where '#' is the 'prompt number' or 'execution count' and 'D' + # D is a number of dots matching the width of the execution count + # in1_regex = r'In \[[0-9]+\]: ' in2_regex = r' \.\.+\.: ' out_regex = r'Out\[[0-9]+\]: ' @@ -475,9 +475,9 @@ class IPythonConsoleLexer(Lexer): self.insertions.append((len(self.buffer), [insertion])) self.buffer += code - for token in self.buffered_tokens(): - yield token - + for token in self.buffered_tokens(): + yield token + class IPyLexer(Lexer): """ Primary lexer for all IPython-like code. |