From 7da7779155211f439e10f7a247f44023374262f6 Mon Sep 17 00:00:00 2001 From: Daniel Eades Date: Sun, 10 Dec 2023 08:38:19 +0000 Subject: [PATCH] remove redundant linting --- .flake8 | 31 ------------------------------- .github/workflows/lint.yml | 32 -------------------------------- Makefile | 2 +- pyproject.toml | 8 -------- sphinx/application.py | 2 +- 5 files changed, 2 insertions(+), 73 deletions(-) delete mode 100644 .flake8 diff --git a/.flake8 b/.flake8 deleted file mode 100644 index e01c0e5c803..00000000000 --- a/.flake8 +++ /dev/null @@ -1,31 +0,0 @@ -[flake8] -max-line-length = 95 -ignore = - E116, - E241, - E251, - E741, - W503, - W504, - I101, - SIM102, - SIM103, - SIM105, - SIM114, - SIM115, - SIM117, - SIM223, - SIM401, - SIM907, - SIM910, -exclude = - .git, - .tox, - .venv, - tests/roots/*, - build/*, - doc/_build/*, - sphinx/search/*, - doc/usage/extensions/example*.py, -per-file-ignores = - tests/*: E501 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index a39d98891b7..c01c6194bcd 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -39,38 +39,6 @@ jobs: continue-on-error: true run: ruff . --format github - flake8: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: "3" - - name: Install dependencies - run: | - python -m pip install --upgrade pip - python -m pip install --upgrade "flake8>=3.5.0" "flake8-simplify" - - name: Lint with flake8 - run: flake8 . - - isort: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: "3" - - name: Install dependencies - run: | - python -m pip install --upgrade pip - python -m pip install --upgrade isort - - name: Lint with isort - run: isort --check-only --diff . - mypy: runs-on: ubuntu-latest diff --git a/Makefile b/Makefile index bf6f61b267d..bd9c43c53ac 100644 --- a/Makefile +++ b/Makefile @@ -41,7 +41,7 @@ clean: clean .PHONY: style-check style-check: - @flake8 + @ruff .PHONY: type-check type-check: diff --git a/pyproject.toml b/pyproject.toml index a0ada3cd3ae..014c05827b0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -80,9 +80,6 @@ docs = [ "sphinxcontrib-websupport", ] lint = [ - "flake8>=3.5.0", - "flake8-simplify", - "isort", "ruff", "mypy>=0.990", "sphinx-lint", @@ -130,11 +127,6 @@ exclude = [ "doc/_build", ] -[tool.isort] -line_length = 95 -profile = "black" -remove_redundant_aliases = true - [tool.ruff] target-version = "py39" # Pin Ruff to Python 3.9 line-length = 95 diff --git a/sphinx/application.py b/sphinx/application.py index d5fbaa9f30a..055c27b6da3 100644 --- a/sphinx/application.py +++ b/sphinx/application.py @@ -955,7 +955,7 @@ def add_transform(self, transform: type[Transform]) -> None: refs: `Transform Priority Range Categories`__ __ https://docutils.sourceforge.io/docs/ref/transforms.html#transform-priority-range-categories - """ # NoQA: E501,RUF100 # Flake8 thinks the URL is too long, Ruff special cases URLs. + """ # NoQA: RUF100 self.registry.add_transform(transform) def add_post_transform(self, transform: type[Transform]) -> None: