Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

AlexWaygood
Copy link
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/.

@@ -1429,7 +1429,6 @@ def equivalent_python(byte_array, byteorder, signed=False):
b'\x01\xff': -255,
b'\x00\xff': -256,
b'\xff\x00': 255,
b'\x00\x01': 256,
Copy link
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
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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants