From 9a70b5e6c90fa175701e460054943416c51bf581 Mon Sep 17 00:00:00 2001 From: Daniel Ciborowski Date: Sun, 12 Mar 2023 19:02:17 -0400 Subject: [PATCH] feat: Switch flake8 to use pyproject.toml (#88) --- .flake8 | 19 ------------------- .vscode/settings.json | 4 ++-- pyproject.toml | 27 +++++++++++++++++++++++++-- 3 files changed, 27 insertions(+), 23 deletions(-) delete mode 100644 .flake8 diff --git a/.flake8 b/.flake8 deleted file mode 100644 index 63c6a8f7..00000000 --- a/.flake8 +++ /dev/null @@ -1,19 +0,0 @@ -[flake8] -max-line-length = 120 -select = "F,E,W,B,B901,B902,B903" -exclude = - ".eggs", - ".git", - ".tox", - "nssm", - "obj", - "out", - "packages", - "pywin32", - "tests", - "swagger_client" -ignore = - E722, - B001, - W503, - E203 diff --git a/.vscode/settings.json b/.vscode/settings.json index 6ff85a2d..33a9da24 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -27,9 +27,9 @@ "/usr/local/py-utils/bin/black" ], "flake8.args": [ - "--config=.flake8" + "--toml-config=pyproject.toml" ], "flake8.path": [ "/usr/local/py-utils/bin/flake8" ] -} \ No newline at end of file +} diff --git a/pyproject.toml b/pyproject.toml index a21b5cbb..76442ed0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -33,9 +33,10 @@ test = [ "flake8-bugbear==22.1.11", "flake8-docstrings", "flake8-formatter_junit_xml", - "flake8==4.0.1", + "flake8", + "flake8-pyproject", "pre-commit==2.17.0", - "pylint==2.12.2", + "pylint==2.17.0", "pylint_junit", "pytest-cov==3.0.0", "pytest-mock<3.7.1", @@ -69,6 +70,28 @@ branch = true [tool.coverage.report] fail_under = 100 +[tool.flake8] +max-line-length = 120 +select = "F,E,W,B,B901,B902,B903" +exclude = [ + ".eggs", + ".git", + ".tox", + "nssm", + "obj", + "out", + "packages", + "pywin32", + "tests", + "swagger_client" +] +ignore = [ + "E722", + "B001", + "W503", + "E203" +] + [tool.pyright] include = ["src"] exclude = [