# Sample usage: # tox --sitepackages -e reformat,mypy,flake8 # tox --sitepackages -e pydocstyle # tox --sitepackages -e mypy,flake8,pydocstyle # # tox -e reformat,mypy,flake8 # tox -e pydocstyle # tox -e mypy,flake8,pydocstyle [main] src_dir= gtner_blog notebooks/spacy-scripts notebooks/transformers-scripts [tox] envlist = reformat,flake8,pydocstyle # No setup.py skipsdist = True [flake8] max-line-length = 120 max-complexity = 10 exclude = build/ .git __pycache__ .*_cache examples/ .tox data/external/ data/interim/ data/processed/ data/raw/ test/data/ test/refdata/ venv/ ignore = E203, W503 [isort] # Compatibility with black (until better integration in https://github.com/psf/black/issues/333#issuecomment-549327523) atomic = True line_length = 120 multi_line_output=3 include_trailing_comma=True force_grid_wrap=0 use_parentheses=True [mypy] ignore_missing_imports = True files = **/*.py [pytest] addopts = --ignore=test/s3fscompat -v filterwarnings = # https://github.com/boto/boto3/issues/1968 ignore:Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated [testenv:reformat] # Used during development (before committing) to format .py files. deps = autoflake black isort pydocstyle commands = autoflake --in-place --recursive --ignore-init-module-imports --remove-unused-variables {[main]src_dir} isort --recursive {[main]src_dir} black {[main]src_dir} [testenv:flake8] deps = flake8 commands = flake8 {[main]src_dir} [testenv:mypy] deps = mypy commands = mypy --config-file tox.ini {[main]src_dir} [testenv:pydocstyle] deps = pydocstyle commands = pydocstyle {[main]src_dir}