Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 6 additions & 12 deletions src/syntax_highlighting/libs/pygments/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""
Pygments
~~~~~~~~
Expand All @@ -17,19 +16,18 @@
* it is usable as a command-line tool and as a library
* ... and it highlights even Brainfuck!

The `Pygments tip`_ is installable with ``easy_install Pygments==dev``.
The `Pygments master branch`_ is installable with ``easy_install Pygments==dev``.

.. _Pygments tip:
http://bitbucket.org/birkenfeld/pygments-main/get/tip.zip#egg=Pygments-dev
.. _Pygments master branch:
https://github.com/pygments/pygments/archive/master.zip#egg=Pygments-dev

:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
:copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import sys
from io import StringIO, BytesIO

from pygments.util import StringIO, BytesIO

__version__ = '2.2.0'
__version__ = '2.10.0'
__docformat__ = 'restructuredtext'

__all__ = ['lex', 'format', 'highlight']
Expand Down Expand Up @@ -84,7 +82,3 @@ def highlight(code, lexer, formatter, outfile=None):
"""
return format(lex(code, lexer), formatter, outfile)


if __name__ == '__main__': # pragma: no cover
from pygments.cmdline import main
sys.exit(main(sys.argv))
17 changes: 17 additions & 0 deletions src/syntax_highlighting/libs/pygments/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
"""
pygments.__main__
~~~~~~~~~~~~~~~~~

Main entry point for ``python -m pygments``.

:copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""

import sys
import pygments.cmdline

try:
sys.exit(pygments.cmdline.main(sys.argv))
except KeyboardInterrupt:
sys.exit(1)
Loading