What's Changed
pycodestyle
This release includes optimized implementations of a large portion of pycodestyle
, for those that use Ruff without an autoformatter.
In this initial release, the rules are being introduced under a "nursery" flag, which requires that users explicitly select them (e.g., select = ["E111"]
); in other words, these rules are not yet enabled via select = ["E"]
.
If you're interested in testing the pycodestyle
rules, you can enable them via:
select = [
"E111", "E112", "E113", "E114", "E115", "E116", "E117",
"E201", "E202", "E203", "E211", "E221", "E222", "E223",
"E224", "E225", "E226", "E227", "E228", "E231", "E251",
"E252", "E261", "E262", "E265", "E266", "E271", "E272",
"E273", "E274", "E275",
]
These rules will be included as part of the E
category in a future release.
Breaking Changes
- [
pyupgrade
] Removekeep-runtime-typing
setting by @charliermarsh in #4427
Rules
- [
pylint
] Addduplicate-bases
rule by @alonme in #4411 - [
pylint
] FixPLW3301
auto-fix with generators by @JonathanPlasse in #4412 - [
flake8-async
] Implement flake8-async plugin by @qdegraaf in #4432 - [
pyupgrade
] Enable automatic rewrites oftyping.Deque
andtyping.DefaultDict
by @charliermarsh in #4420 - [
flake8-pyi
] Implementunannotated-assignment-in-stub
(PY052
) by @sladyn98 in #4293 - [
tryceratops
] Implement TRY302 -raise
afterexcept
by @john-h-k in #4461 - [
flake8-bandit
] Improve SQL injection detection logic (S608
) by @scop in #4499 - [
flake8-todos
] Implementflake8_todos
by @evanrittenhouse in #3921 - [
flake8-future-annotations
] Implementflake8-future-annotations
FA100 by @TylerYep in #3979 - Enable
pycodestyle
rules by @charliermarsh in #3689 - Enable
pycodestyle
rules under new "nursery" category by @charliermarsh in #4407
Settings
- Merge subsettings when extending configurations by @bendoerry in #4431
Bug Fixes
- Extend multi-line noqa directives to start-of-line by @charliermarsh in #4490
- Fix scoping of comprehensions within classes by @charliermarsh in #4494
- Enable autofix for split-assertions at top level by @charliermarsh in #4405
- Ignore ANN401 for overridden methods by @JonathanPlasse in #4409
- Fix
RUF010
autofix within f-strings by @JonathanPlasse in #4423 - Update C419 to be a suggested fix by @madkinsz in #4424
- Fix expected-indentation errors with end-of-line comments by @charliermarsh in #4438
- Emit non-logical newlines for "empty" lines by @charliermarsh in #4444
- Avoid emitting empty logical lines by @charliermarsh in #4452
- Avoid flagging missing whitespace for decorators by @charliermarsh in #4454
- Remove special-casing for whitespace-around-@ by @charliermarsh in #4458
- Avoid triggering
pd#at
and friends on non-subscripts by @charliermarsh in #4474 - Include precise tokens for extraneous-whitespace diagnostics by @charliermarsh in #4471
- Allow shebang comments at start-of-file by @charliermarsh in #4473
- Bring pycodestyle rules into full compatibility (on SciPy) by @charliermarsh in #4472
- Invert quote-style when generating code within f-strings by @charliermarsh in #4487
- Fix COM812 false positive in string subscript by @JonathanPlasse in #4493
- Overhaul sdist handling by @konstin in #4439
New Contributors
- @TylerYep made their first contribution in #3979
- @yanksyoon made their first contribution in #4428
- @bendoerry made their first contribution in #4431
- @qdegraaf made their first contribution in #4432
- @jameslamb made their first contribution in #4446
- @john-h-k made their first contribution in #4461
Full Changelog: v0.0.267...v0.0.268