diff options
author | shadchin <shadchin@yandex-team.ru> | 2022-02-10 16:44:30 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:44:30 +0300 |
commit | 2598ef1d0aee359b4b6d5fdd1758916d5907d04f (patch) | |
tree | 012bb94d777798f1f56ac1cec429509766d05181 /contrib/python/Pygments/py2/pygments/formatters/other.py | |
parent | 6751af0b0c1b952fede40b19b71da8025b5d8bcf (diff) | |
download | ydb-2598ef1d0aee359b4b6d5fdd1758916d5907d04f.tar.gz |
Restoring authorship annotation for <shadchin@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/python/Pygments/py2/pygments/formatters/other.py')
-rw-r--r-- | contrib/python/Pygments/py2/pygments/formatters/other.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/contrib/python/Pygments/py2/pygments/formatters/other.py b/contrib/python/Pygments/py2/pygments/formatters/other.py index c09eff0cb4..f3fe919a50 100644 --- a/contrib/python/Pygments/py2/pygments/formatters/other.py +++ b/contrib/python/Pygments/py2/pygments/formatters/other.py @@ -10,7 +10,7 @@ """ from pygments.formatter import Formatter -from pygments.util import get_choice_opt +from pygments.util import get_choice_opt from pygments.token import Token from pygments.console import colorize @@ -87,17 +87,17 @@ class RawTokenFormatter(Formatter): if self.compress == 'gz': import gzip outfile = gzip.GzipFile('', 'wb', 9, outfile) - + def write(text): outfile.write(text.encode()) flush = outfile.flush elif self.compress == 'bz2': import bz2 compressor = bz2.BZ2Compressor(9) - + def write(text): outfile.write(compressor.compress(text.encode())) - + def flush(): outfile.write(compressor.flush()) outfile.flush() @@ -118,15 +118,15 @@ class RawTokenFormatter(Formatter): write("%s\t%r\n" % (ttype, value)) flush() - + TESTCASE_BEFORE = u'''\ - def testNeedsName(lexer): + def testNeedsName(lexer): fragment = %r tokens = [ ''' TESTCASE_AFTER = u'''\ ] - assert list(lexer.get_tokens(fragment)) == tokens + assert list(lexer.get_tokens(fragment)) == tokens ''' |