mirror of
https://github.com/Mailu/Mailu.git
synced 2025-01-16 02:46:44 +02:00
Add pygments to requirements
This commit is contained in:
parent
9cb6962335
commit
0c38128c4e
@ -21,16 +21,11 @@ from flask_marshmallow import Marshmallow
|
||||
|
||||
from OpenSSL import crypto
|
||||
|
||||
try:
|
||||
from pygments import highlight
|
||||
from pygments.token import Token
|
||||
from pygments.lexers import get_lexer_by_name
|
||||
from pygments.lexers.data import YamlLexer
|
||||
from pygments.formatters import get_formatter_by_name
|
||||
except ModuleNotFoundError:
|
||||
COLOR_SUPPORTED = False
|
||||
else:
|
||||
COLOR_SUPPORTED = True
|
||||
from pygments import highlight
|
||||
from pygments.token import Token
|
||||
from pygments.lexers import get_lexer_by_name
|
||||
from pygments.lexers.data import YamlLexer
|
||||
from pygments.formatters import get_formatter_by_name
|
||||
|
||||
from mailu import models, dkim
|
||||
|
||||
@ -92,10 +87,7 @@ class Logger:
|
||||
self.debug = debug
|
||||
self.print = print
|
||||
|
||||
if want_color and not COLOR_SUPPORTED:
|
||||
raise ValueError('Please install pygments to colorize output')
|
||||
|
||||
self.color = want_color or (can_color and COLOR_SUPPORTED)
|
||||
self.color = want_color or can_color
|
||||
|
||||
self._counter = Counter()
|
||||
self._schemas = {}
|
||||
|
@ -36,6 +36,7 @@ marshmallow-sqlalchemy==0.24.1
|
||||
passlib==1.7.4
|
||||
psycopg2==2.8.2
|
||||
pycparser==2.19
|
||||
Pygments==2.8.1
|
||||
pyOpenSSL==19.0.0
|
||||
python-dateutil==2.8.0
|
||||
python-editor==1.0.4
|
||||
|
@ -17,6 +17,7 @@ gunicorn
|
||||
tabulate
|
||||
PyYAML
|
||||
PyOpenSSL
|
||||
Pygments
|
||||
dnspython
|
||||
bcrypt
|
||||
tenacity
|
||||
|
Loading…
Reference in New Issue
Block a user