diff --git a/setup.cfg b/setup.cfg index ba8845b..b64877f 100644 --- a/setup.cfg +++ b/setup.cfg @@ -47,6 +47,30 @@ include = console_scripts = rsrcfork = rsrcfork.__main__:main +[flake8] +exclude = + .mypy_cache/, + build/, + dist/, + # The following entries would also be added by default by flake8 when not specifying a custom exclude list. + # TODO Once flake8 3.8.0 is released, change the name of this configuration setting from exclude to extend-exclude and remove the entries below. + .git/, + .tox/, + __pycache__/, + +# The following issues are ignored because they do not match our code style: +ignore = + E226, # missing whitespace around arithmetic operator + E261, # at least two spaces before inline comment + E501, # line too long + W293, # blank line contains whitespace + W503, # line break before binary operator + +# flake8-tabs configuration +use-flake8-tabs = true +blank-lines-indent = always +indent-tabs-def = 1 + [mypy] files=rsrcfork/**/*.py python_version = 3.6 diff --git a/tox.ini b/tox.ini index 820bb27..76e4e76 100644 --- a/tox.ini +++ b/tox.ini @@ -1,10 +1,16 @@ [tox] # When adding a new Python version here, please also update the list of Python versions called by the GitHub Actions workflow (.github/workflows/ci.yml). -envlist = py{36,37,38},mypy +envlist = py{36,37,38},flake8,mypy [testenv] commands = {envpython} -m unittest discover --start-directory ./tests +[testenv:flake8] +deps = + flake8 + flake8-tabs +commands = flake8 + [testenv:mypy] deps = mypy