Conversation
There was a problem hiding this comment.
Please add bug fixes, new features, breaking changes and anything else you think is worthwhile mentioning to the master (unreleased) section of CHANGELOG.md. If no CHANGELOG update is needed add the following to the PR description: [x] No CHANGELOG update needed
There was a problem hiding this comment.
Code Review
This pull request replaces isort and flake8 with Ruff for linting and formatting, updating configuration files, documentation, and project dependencies. The feedback identifies a contradiction in the Ruff configuration where import sorting was accidentally disabled and suggests adding additional rule prefixes to maintain full parity with the previous toolset.
CHANGELOG updated or no update needed, thanks! 😄
| "B905", # zip() without an explicit strict= parameter | ||
| "UP032", # Use f-string instead of format call | ||
| "UP031", # Use format specifiers instead of percent format | ||
| "SIM300", # Yoda condition detected (constant before variable) | ||
| "SIM108", # Use ternary operator instead of if-else block | ||
| "ISC003", # Explicitly concatenated string should be implicitly concatenated | ||
| "UP035", # Deprecated typing alias usage | ||
| "UP006", # Use type instead of Type for type annotation | ||
| "SIM115", # Use a context manager for opening files | ||
| "SIM118", # Use key not in dict instead of key not in dict.keys() | ||
| "UP024", # Replace aliased errors with OSError | ||
| "UP045", # Use X | None for optional type annotations | ||
| "SIM103", # Return negated condition directly | ||
| "UP007", # Use X | Y for union type annotations | ||
| "B904", # Raise exceptions within except clause using raise from | ||
| "UP028", # Replace yield over for loop with yield from | ||
| "C409", # Unnecessary list comprehension passed to tuple() | ||
| "E226", # Missing whitespace around arithmetic operator |
There was a problem hiding this comment.
@williballenthin @mr-tz I addressed and removed a number of these already - this is what is left. Most of these require many changes, with little benefit IMO. But I'm happy to address any remaining that we'd like to address in this PR.
There was a problem hiding this comment.
I'm on the edge for "UP035", # Deprecated typing alias usage. It's quite a few changes, but it removes deprecated usage.
|
Boo, I was concerned that removing those unused imports was going to break things. I'll take a closer look next week. |
|
Thanks Mike, I also recommend replacing |
Recent versions of
setuptoolsremoved thepkg_resourcesmodule. Our legacyflake8plugins required this module, which prevented us from updating our build tools. We migrated toruffto remove these broken plugins and allow us to use the latestsetuptoolsversions.closes #2945
Checklist