mirror of
https://github.com/morpheus65535/bazarr.git
synced 2025-04-24 14:47:16 -04:00
Updated vendored dependencies.
This commit is contained in:
parent
708fbfcd8e
commit
bbe2483e21
1750 changed files with 53887 additions and 34406 deletions
|
@ -4,7 +4,7 @@
|
|||
|
||||
Command line interface.
|
||||
|
||||
:copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS.
|
||||
:copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS.
|
||||
:license: BSD, see LICENSE for details.
|
||||
"""
|
||||
|
||||
|
@ -25,7 +25,7 @@ from pygments.formatters.latex import LatexEmbeddedLexer, LatexFormatter
|
|||
from pygments.formatters import get_all_formatters, get_formatter_by_name, \
|
||||
load_formatter_from_file, get_formatter_for_filename, find_formatter_class
|
||||
from pygments.formatters.terminal import TerminalFormatter
|
||||
from pygments.formatters.terminal256 import Terminal256Formatter
|
||||
from pygments.formatters.terminal256 import Terminal256Formatter, TerminalTrueColorFormatter
|
||||
from pygments.filters import get_all_filters, find_filter_class
|
||||
from pygments.styles import get_all_styles, get_style_by_name
|
||||
|
||||
|
@ -185,7 +185,7 @@ def main_inner(parser, argns):
|
|||
return 0
|
||||
|
||||
if argns.V:
|
||||
print('Pygments version %s, (c) 2006-2021 by Georg Brandl, Matthäus '
|
||||
print('Pygments version %s, (c) 2006-2022 by Georg Brandl, Matthäus '
|
||||
'Chajdas and contributors.' % __version__)
|
||||
return 0
|
||||
|
||||
|
@ -445,7 +445,9 @@ def main_inner(parser, argns):
|
|||
return 1
|
||||
else:
|
||||
if not fmter:
|
||||
if '256' in os.environ.get('TERM', ''):
|
||||
if os.environ.get('COLORTERM','') in ('truecolor', '24bit'):
|
||||
fmter = TerminalTrueColorFormatter(**parsed_opts)
|
||||
elif '256' in os.environ.get('TERM', ''):
|
||||
fmter = Terminal256Formatter(**parsed_opts)
|
||||
else:
|
||||
fmter = TerminalFormatter(**parsed_opts)
|
||||
|
@ -636,6 +638,9 @@ def main(args=sys.argv):
|
|||
|
||||
try:
|
||||
return main_inner(parser, argns)
|
||||
except BrokenPipeError:
|
||||
# someone closed our stdout, e.g. by quitting a pager.
|
||||
return 0
|
||||
except Exception:
|
||||
if argns.v:
|
||||
print(file=sys.stderr)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue