Add flake8 configuration

This commit is contained in:
dgelessus 2019-12-30 02:57:31 +01:00
parent 3a805c3e56
commit f690caac24
2 changed files with 31 additions and 1 deletions

View File

@ -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

View File

@ -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