From 57d26917136ae237b2e142e515b1ee06bfc92f91 Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Thu, 1 Feb 2024 17:21:30 +0100 Subject: [PATCH] Revert replacement of flake8 with ruff Start with reverting parts of commit 26be794 in #629 related to config and CI jobs. --- .flake8 | 4 ++++ .github/workflows/ci.yaml | 4 ++-- .ruff.toml | 6 ------ CONTRIBUTING.rst | 2 +- pyproject.toml | 3 ++- 5 files changed, 9 insertions(+), 10 deletions(-) create mode 100644 .flake8 delete mode 100644 .ruff.toml diff --git a/.flake8 b/.flake8 new file mode 100644 index 0000000..2b7958b --- /dev/null +++ b/.flake8 @@ -0,0 +1,4 @@ +[flake8] +import-order-style = pep8 +application-import-names = yamllint +ignore = W503,W504 diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 506d610..780831e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -21,9 +21,9 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 - run: - pip install ruff sphinx rstcheck[sphinx] doc8 + pip install flake8 flake8-import-order sphinx rstcheck[sphinx] doc8 - run: pip install . - - run: ruff . + - run: flake8 . - run: doc8 $(git ls-files '*.rst') - run: rstcheck --ignore-directives automodule $(git ls-files '*.rst') - run: yamllint --strict $(git ls-files '*.yaml' '*.yml') diff --git a/.ruff.toml b/.ruff.toml deleted file mode 100644 index c7e7ce9..0000000 --- a/.ruff.toml +++ /dev/null @@ -1,6 +0,0 @@ -[lint] -extend-select = ["B", "I", "PGH", "TRY", "UP"] -ignore = ["TRY003"] - -[lint.isort] -known-third-party = ["tests"] diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index a1fde07..312c6d8 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -23,7 +23,7 @@ Pull Request Process .. code:: bash - ruff . + flake8 . If you added/modified documentation: diff --git a/pyproject.toml b/pyproject.toml index 5fd24df..63746f6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,8 +26,9 @@ dynamic = ["version"] [project.optional-dependencies] dev = [ "doc8", + "flake8", + "flake8-import-order", "rstcheck[sphinx]", - "ruff", "sphinx", ]