1import os 2 3from typing_extensions import Final 4 5PYTHON2_VERSION = (2, 7) # type: Final 6PYTHON3_VERSION = (3, 6) # type: Final 7PYTHON3_VERSION_MIN = (3, 4) # type: Final 8CACHE_DIR = '.mypy_cache' # type: Final 9CONFIG_FILE = ['mypy.ini', '.mypy.ini'] # type: Final 10PYPROJECT_CONFIG_FILES = ['pyproject.toml', ] # type: Final 11SHARED_CONFIG_FILES = ['setup.cfg', ] # type: Final 12USER_CONFIG_FILES = ['~/.config/mypy/config', '~/.mypy.ini', ] # type: Final 13if os.environ.get('XDG_CONFIG_HOME'): 14 USER_CONFIG_FILES.insert(0, os.path.join(os.environ['XDG_CONFIG_HOME'], 'mypy/config')) 15 16CONFIG_FILES = (CONFIG_FILE + PYPROJECT_CONFIG_FILES + SHARED_CONFIG_FILES + 17 USER_CONFIG_FILES) # type: Final 18 19# This must include all reporters defined in mypy.report. This is defined here 20# to make reporter names available without importing mypy.report -- this speeds 21# up startup. 22REPORTER_NAMES = ['linecount', 23 'any-exprs', 24 'linecoverage', 25 'memory-xml', 26 'cobertura-xml', 27 'xml', 28 'xslt-html', 29 'xslt-txt', 30 'html', 31 'txt', 32 'lineprecision'] # type: Final 33 34# Threshold after which we sometimes filter out most errors to avoid very 35# verbose output 36MANY_ERRORS_THRESHOLD = 200 # type: Final 37