From 1b36bf2bb64539cf0c74af94e6cfcf5c087610fd Mon Sep 17 00:00:00 2001 From: Tim Byrne Date: Mon, 10 Jul 2023 13:58:02 -0500 Subject: [PATCH] Move all test/linting configs into pyproject.toml Except for flake8 which doesn't support pyproject.toml yet. --- .flake8 | 2 ++ pylintrc | 17 ----------------- pyproject.toml | 31 +++++++++++++++++++++++++++++++ pytest.ini | 5 ----- test/pylintrc | 1 - 5 files changed, 33 insertions(+), 23 deletions(-) create mode 100644 .flake8 delete mode 100644 pylintrc create mode 100644 pyproject.toml delete mode 100644 pytest.ini delete mode 120000 test/pylintrc diff --git a/.flake8 b/.flake8 new file mode 100644 index 0000000..6deafc2 --- /dev/null +++ b/.flake8 @@ -0,0 +1,2 @@ +[flake8] +max-line-length = 120 diff --git a/pylintrc b/pylintrc deleted file mode 100644 index ba41b74..0000000 --- a/pylintrc +++ /dev/null @@ -1,17 +0,0 @@ -[BASIC] -good-names=pytestmark - -[DESIGN] -max-args=14 -max-locals=28 -max-attributes=8 -max-statements=65 - -[SIMILARITIES] -min-similarity-lines=8 - -[MESSAGES CONTROL] -disable=redefined-outer-name - -[TYPECHECK] -ignored-modules=py diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..1e51d44 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,31 @@ +[tool.pytest.ini_options] +cache_dir = "/tmp" +addopts = "-ra" +markers = [ + "deprecated", # marks tests for deprecated features (deselect with '-m "not deprecated"') +] + +[tool.pylint.design] +max-args = 14 +max-locals = 28 +max-attributes = 8 +max-statements = 65 + +[tool.pylint.format] +max-line-length = 120 + +[tool.pylint."messages control"] +disable = [ + "redefined-outer-name", +] + +[tool.pylint.similarities] +ignore-imports = "yes" +min-similarity-lines = 8 + +[tool.black] +line-length = 120 + +[tool.isort] +line_length = 120 +profile = "black" diff --git a/pytest.ini b/pytest.ini deleted file mode 100644 index d032ea5..0000000 --- a/pytest.ini +++ /dev/null @@ -1,5 +0,0 @@ -[pytest] -cache_dir = /tmp -addopts = -ra -markers = - deprecated: marks tests for deprecated features (deselect with '-m "not deprecated"') diff --git a/test/pylintrc b/test/pylintrc deleted file mode 120000 index 05334af..0000000 --- a/test/pylintrc +++ /dev/null @@ -1 +0,0 @@ -../pylintrc \ No newline at end of file