1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-07-13 01:20:24 +02:00

add more type annotations

This commit is contained in:
Kelly Brazil
2022-10-14 17:28:34 -07:00
parent 38e2addbb6
commit 5b8cb497de

View File

@ -31,6 +31,7 @@ MetadataType = Dict[
] ]
# make pygments import optional # make pygments import optional
PYGMENTS_INSTALLED: bool = False
try: try:
import pygments import pygments
from pygments import highlight from pygments import highlight
@ -40,21 +41,21 @@ try:
from pygments.formatters import Terminal256Formatter from pygments.formatters import Terminal256Formatter
PYGMENTS_INSTALLED = True PYGMENTS_INSTALLED = True
except Exception: except Exception:
PYGMENTS_INSTALLED = False pass
JC_CLEAN_EXIT = 0 JC_CLEAN_EXIT: int = 0
JC_ERROR_EXIT = 100 JC_ERROR_EXIT: int = 100
MAX_EXIT = 255 MAX_EXIT: int = 255
class info(): class info():
version = __version__ version: str = __version__
description = 'JSON Convert' description: str = 'JSON Convert'
author = 'Kelly Brazil' author: str = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com' author_email: str = 'kellyjonbrazil@gmail.com'
website = 'https://github.com/kellyjonbrazil/jc' website: str = 'https://github.com/kellyjonbrazil/jc'
copyright = '© 2019-2022 Kelly Brazil' copyright: str = '© 2019-2022 Kelly Brazil'
license = 'MIT License' license: str = 'MIT License'
# We only support 2.3.0+, pygments changed color names in 2.4.0. # We only support 2.3.0+, pygments changed color names in 2.4.0.