From 44dd569d8dfb9fab50b5eac31ab6e94ce0309691 Mon Sep 17 00:00:00 2001 From: Feda Curic Date: Tue, 12 Sep 2023 12:56:53 +0200 Subject: [PATCH] Remove setup.cfg, use pyproject.toml instead Flake8-pyproject is needed as flake8 does not support pyproject.toml out of the box. --- .github/workflows/build.yml | 1 - pyproject.toml | 15 +++++++++++++++ setup.cfg | 16 ---------------- style-requirements.txt | 1 + 4 files changed, 16 insertions(+), 17 deletions(-) delete mode 100644 setup.cfg diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 87931207b9f..8d91ee2514e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -189,7 +189,6 @@ jobs: mkdir tmp_tests mv tests tmp_tests/tests mv test-data tmp_tests/test-data - mv setup.cfg tmp_tests/setup.cfg mkdir tmp_tests/.git - name: Test docs diff --git a/pyproject.toml b/pyproject.toml index 34f84e205b3..52d5353b0e9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,3 +37,18 @@ include = '(\.pyi?|\.ipynb|\.py\.j2)$' [tool.setuptools_scm] write_to = "src/ert/shared/version.py" + +[tool.flake8] +per-file-ignores = [ + # Ignore all protobuf v2 files + "*_pb2.py: E" +] +ignore = [ + # whitespace before ':', solved by black: + "E203", + # line break before binary operator, solved by black: + "W503", + # The minimal set of ignores that makes flake8 pass when flake8-bugbear is installed: + "B019" +] +max-line-length = 88 diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index ecc16baf9e5..00000000000 --- a/setup.cfg +++ /dev/null @@ -1,16 +0,0 @@ -[aliases] -test = pytest - -[flake8] -per-file-ignores = - # Ignore all protobuf v2 files - *_pb2.py: E -# We ignore only things that black takes (better) care of: -ignore = - # whitespace before ':'; solved by black: - E203 - # line break before binary operator, solved by black: - W503 - # The minimal set of ignores that makes flake8 pass when flake8-bugbear is installed: - B019 -max-line-length = 88 diff --git a/style-requirements.txt b/style-requirements.txt index 53b669ac4e4..d220450e301 100644 --- a/style-requirements.txt +++ b/style-requirements.txt @@ -1,4 +1,5 @@ cmake-format +Flake8-pyproject flake8 flake8-bugbear flake8-simplify