Add pygments to requirements

master
Alexander Graf 3 years ago
parent 9cb6962335
commit 0c38128c4e

@ -21,16 +21,11 @@ from flask_marshmallow import Marshmallow
from OpenSSL import crypto from OpenSSL import crypto
try: from pygments import highlight
from pygments import highlight from pygments.token import Token
from pygments.token import Token from pygments.lexers import get_lexer_by_name
from pygments.lexers import get_lexer_by_name from pygments.lexers.data import YamlLexer
from pygments.lexers.data import YamlLexer from pygments.formatters import get_formatter_by_name
from pygments.formatters import get_formatter_by_name
except ModuleNotFoundError:
COLOR_SUPPORTED = False
else:
COLOR_SUPPORTED = True
from mailu import models, dkim from mailu import models, dkim
@ -92,10 +87,7 @@ class Logger:
self.debug = debug self.debug = debug
self.print = print self.print = print
if want_color and not COLOR_SUPPORTED: self.color = want_color or can_color
raise ValueError('Please install pygments to colorize output')
self.color = want_color or (can_color and COLOR_SUPPORTED)
self._counter = Counter() self._counter = Counter()
self._schemas = {} self._schemas = {}

@ -36,6 +36,7 @@ marshmallow-sqlalchemy==0.24.1
passlib==1.7.4 passlib==1.7.4
psycopg2==2.8.2 psycopg2==2.8.2
pycparser==2.19 pycparser==2.19
Pygments==2.8.1
pyOpenSSL==19.0.0 pyOpenSSL==19.0.0
python-dateutil==2.8.0 python-dateutil==2.8.0
python-editor==1.0.4 python-editor==1.0.4

@ -17,6 +17,7 @@ gunicorn
tabulate tabulate
PyYAML PyYAML
PyOpenSSL PyOpenSSL
Pygments
dnspython dnspython
bcrypt bcrypt
tenacity tenacity

Loading…
Cancel
Save