diff --git a/pyproject.toml b/pyproject.toml index e4ecb439d2..7e42aa1a97 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -70,16 +70,37 @@ casd-dev = [ "scipy >=1.10.1, <2.0", # Only used to test de_net_a_brut reform ] + +# ; E128/133: We prefer hang-closing visual indents +# ; E251: We prefer `function(x = 1)` over `function(x=1)` +# ; E501: We do not enforce a maximum line length +# ; F403/405: We ignore * imports +# ; W503/504: We break lines before binary operators (Knuth's style) + +[tool.flake8] +hang-closing = true +ignore = ["E128","E251","F403","F405","E501","W503", ] +docstring-quotes = "single" +inline-quotes = "single" +multiline-quotes = "single" + +[tool.pep8] +hang-closing = true +ignore = ["E128","E251","F403","F405","E501","W503"] +in-place = true + [tool.pytest.ini_options] -addopts = "--showlocals --doctest-modules" -testpaths = [ "openfisca_country_template/tests" ] +addopts = "--showlocals --exitfirst --doctest-modules --disable-pytest-warnings" +testpaths = "tests" python_files = "**/*.py" filterwarnings = [ "error", "ignore::UserWarning", - 'ignore:function ham\(\) is deprecated:DeprecationWarning' + 'ignore:function ham\(\) is deprecated:DeprecationWarning', + "ignore:invalid value encountered in divide:RuntimeWarning", ] + [tool.pylint.messages_control] disable = [ "invalid-name", diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index ffef11b93b..0000000000 --- a/setup.cfg +++ /dev/null @@ -1,22 +0,0 @@ -; E128/133: We prefer hang-closing visual indents -; E251: We prefer `function(x = 1)` over `function(x=1)` -; E501: We do not enforce a maximum line length -; F403/405: We ignore * imports -; W503/504: We break lines before binary operators (Knuth's style) - -[flake8] -hang-closing = true -ignore = E128,E251,F403,F405,E501,W503 -docstring-quotes = single -inline-quotes = single -multiline-quotes = single - -[pep8] -hang-closing = true -ignore = E128,E251,F403,F405,E501,W503 -in-place = true - -[tool:pytest] -addopts = --showlocals --exitfirst --doctest-modules --disable-pytest-warnings -testpaths = tests -python_files = **/*.py