Skip to content

Drop flake8-noqa and remove workarounds to work with Ruff - #13571

Merged
srittau merged 6 commits into
python:mainfrom
Avasam:dropping-flake8-noqa
Mar 3, 2025
Merged

srittau merged 6 commits into
python:mainfrom
Avasam:dropping-flake8-noqa

Conversation

@Avasam

@Avasam Avasam commented Mar 2, 2025

Copy link
Copy Markdown
Collaborator

Closes #13296 See that issue for explanation.

If the package is ever updated to include plinss/flake8-noqa#30 we could partially revert this PR.

As a follow-up, I can include more flake8-pyi (PYI) codes and simplify its config in pyproject.toml. By excluding some codes instead of including most of them.

@Avasam
Avasam force-pushed the dropping-flake8-noqa branch from 31ff0f0 to 9201687 Compare March 2, 2025 02:59
@github-actions

This comment has been minimized.

Comment thread pyproject.toml
@@ -66,8 +66,7 @@ select = [
"FURB177", # Prefer `Path.cwd()` over `Path().resolve()` for current-directory lookups
"FURB187", # Use of assignment of `reversed` on list `{name}`
# PYI: only enable rules that have autofixes and that we always want to fix (even manually),

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In a separate PR (or this one if you prefer), this could be changed to

Suggested change
# PYI: only enable rules that have autofixes and that we always want to fix (even manually),
# PYI: only enable rules for which we never noqa their flake8-pyi plugin equivalent,

Even better imo is to instead select all and disable the few codes where this happens.

@Avasam Avasam changed the title Dropped flake8-noqa and remove workarounds to work with Ruff Drop flake8-noqa and remove workarounds to work with Ruff Mar 2, 2025
@github-actions

github-actions Bot commented Mar 2, 2025

Copy link
Copy Markdown
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@srittau
srittau merged commit cc206f7 into python:main Mar 3, 2025
@Avasam
Avasam deleted the dropping-flake8-noqa branch March 3, 2025 15:01
mmingyu pushed a commit to mmingyu/typeshed that referenced this pull request May 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unmaintained flake8-noqa, Adding support for external codes

2 participants