Conversation
Contributor
feanil
commented
Mar 3, 2026
- feat: add ruff and configure it to match current pycodestyle rules
- chore: regenerate compiled requirements after adding ruff
- feat: add ruff Makefile target
- feat: add ruff to quality CI workflow alongside pycodestyle
kdmccormick
reviewed
Mar 3, 2026
feanil
commented
Mar 3, 2026
| "E731", # do not assign a lambda expression | ||
| "E741", # ambiguous variable name | ||
| "E743", # ambiguous function name | ||
| # The rules below were added in pycodestyle 2.9.x but we were pinned to 2.8.x, |
Contributor
Author
There was a problem hiding this comment.
W503 and W504 (line break before/after binary operator) were both ignored in the old setup.cfg pycodestyle config but are absent here. That is intentional: ruff does not implement either rule.
These two rules are mutually contradictory — one requires breaking before the operator, the other after — so PEP 8 guidance on this has gone back and forth over the years. Ruff took the pragmatic approach of not enforcing either one, meaning whatever line-break style the codebase already uses will be accepted as-is.
Contributor
bradenmacdonald
left a comment
There was a problem hiding this comment.
I'm so happy to see this. Here's some suggestions but feel free to ignore if you're set on exact pycodestyle config parity.
Agrendalath
reviewed
Mar 3, 2026
Agrendalath
reviewed
Mar 3, 2026
Adds ruff to testing requirements and configures it in pyproject.toml to enforce the same E/W rules that pycodestyle 2.8.x was enforcing. Two additional rules (E714, E721) that pycodestyle 2.8.x did not enforce are explicitly ignored for now and can be cleaned up in a follow-up. Part of the migration from pycodestyle → ruff. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Runs ruff alongside pycodestyle so we can validate parity before removing pycodestyle in the next commit. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Remove pycodestyle from requirements - Remove pycodestyle version constraint (pinned to <2.9.0 due to a false positive E275 bug that is no longer relevant) - Remove [pycodestyle] config from setup.cfg (config now lives in pyproject.toml under [tool.ruff]) - Remove pycodestyle Makefile target - Remove make pycodestyle from quality CI workflow Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Remove unnecessary ignores. Co-authored-by: Braden MacDonald <braden@opencraft.com>
Most of these ignores are unnecessary as we're passing them now and we want to check them in the future. E714 only had one fixable violation so we just fixed it.
* Update the call to `ruff` so that it outputs in a github friendly manner. * Remove ruff exclusions that are already covered by .gitignore which ruff respects.
Update the requirements to drop pycodestyle and add ruff.
f71d17b to
84956c3
Compare
Agrendalath
approved these changes
Mar 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.