Skip to content

Enable most pyflakes rules when running ruff on Lib/test in CI#110917

Closed
AlexWaygood wants to merge 2 commits intopython:mainfrom
AlexWaygood:more-ruff
Closed

Enable most pyflakes rules when running ruff on Lib/test in CI#110917
AlexWaygood wants to merge 2 commits intopython:mainfrom
AlexWaygood:more-ruff

Conversation

@AlexWaygood
Copy link
Copy Markdown
Member

Ruff's pyflakes rules generally have very few false-positive errors; I think we generally should aim to have as many enabled in CI as is practical. With the exception of a few rules that currently have many hits when enabled on our test suite, this PR enables the full suite of pyflakes rules when running ruff on Lib/test/.

Comment thread Lib/test/test_long.py
b'\x01\xff': -255,
b'\x00\xff': -256,
b'\xff\x00': 255,
b'\x00\x01': 256,
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This fixes a micro-bug flagged by ruff: this dictionary currently has two identical key/value pairs!

b'\x00\x01': 256,

b'\x00\x01': 256,

@AlexWaygood
Copy link
Copy Markdown
Member Author

Adding DO-NOT-MERGE for now. This PR probably warrants discussion on Discourse before merging, since it's possible this could disrupt other core devs' workflows if they're unfamiliar with ruff

@github-actions
Copy link
Copy Markdown

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions Bot added the stale Stale PR or inactive for long period of time. label Apr 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting merge DO-NOT-MERGE skip issue skip news stale Stale PR or inactive for long period of time.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants