diff --git a/.flake8 b/.flake8 index b7a951873..b7ddf7fe3 100644 --- a/.flake8 +++ b/.flake8 @@ -1,4 +1,41 @@ [flake8] -extend-ignore = Y015 max-line-length = 88 exclude = .eggs,.git,.hg,.mypy_cache,.tox,.venv,venv,__pycached__,_build,buck-out,build,dist,node_modules +ignore = + ; formatting handled by black + ; https://pycodestyle.readthedocs.io/en/latest/intro.html#error-codes + ; https://github.com/ambv/black/issues/429 + E101, + E111, + E114, + E115, + E116, + E117, + E121, + E122, + E123, + E124, + E125, + E126, + E127, + E128, + E129, + E131, + E133, + E2, + E3, + E5, + E701, + E702, + E703, + E704, + W1, + W2, + W3, + W503, + W504, + F401, + F821, + ; wrong in type stubs '__all__ = []' for some reason + F822 + Y015 diff --git a/pyproject.toml b/pyproject.toml index b3ffa990d..1107980b4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,6 +61,13 @@ select = [ # "PYI032", # use `object`, not `Any`, as the second parameter to `__eq__` ] +[tool.pytest.ini_options] +testpaths = ["tests"] +addopts = "--tb=native -s -v --cache-clear" +filterwarnings = [ + "error", # all warnings that are not ignored should raise an error +] + [build-system] requires = ["poetry-core>=1.0.0"] build-backend = "poetry.core.masonry.api" diff --git a/pytest.ini b/pytest.ini deleted file mode 100644 index 3dd3f065f..000000000 --- a/pytest.ini +++ /dev/null @@ -1,8 +0,0 @@ -[pytest] -testpaths = - ./tests -addopts = - --tb=native - -s - -v - --cache-clear diff --git a/tox.ini b/tox.ini deleted file mode 100644 index 743bef7c2..000000000 --- a/tox.ini +++ /dev/null @@ -1,47 +0,0 @@ -[pytest] -addopts = --pdbcls IPython.terminal.debugger:TerminalPdb -filterwarnings = - ; all warnings that are not ignored should raise an error - error - ; pytest wants to remove the `message` kwarg to pytest.raises, but there isn't - ; an alternative at the moment. - ; https://github.com/pytest-dev/pytest/issues/3974 - ignore::pytest.PytestDeprecationWarning -[flake8] -ignore = - ; formatting handled by black - ; https://pycodestyle.readthedocs.io/en/latest/intro.html#error-codes - ; https://github.com/ambv/black/issues/429 - E101, - E111, - E114, - E115, - E116, - E117, - E121, - E122, - E123, - E124, - E125, - E126, - E127, - E128, - E129, - E131, - E133, - E2, - E3, - E5, - E701, - E702, - E703, - E704, - W1, - W2, - W3, - W503, - W504, - F401, - F821, - ; wrong in type stubs '__all__ = []' for some reason - F822