NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #123 most downloaded on PyPI
An extremely fast Python linter and code formatter, written in Rust.
Last release 3 days ago
16 Sep 2026
Ships on a steady schedule
a new release about every 2 weeks
Nearly every release is documented
notes for 59 of the last 60 stable releases
4 versions withdrawn
withdrawn after publishing
4 years old
424 releases · first in 2022
One column per quarter.
Modify deprecated-import (UP035) to prefer typing_extensions in some versions by @tjkuson in https://github.com/astral-sh/ruff/pull/5291
<!-- Release notes generated using configuration in .github/release.yml at v0.0.275 -->
Highlights include a 7-10x decrease in Ruff's cache size.
compare-to-empty-string (PLC1901) to nursery by @charliermarsh in https://github.com/astral-sh/ruff/pull/5264mutable-class-default (RUF012) by @charliermarsh in https://github.com/astral-sh/ruff/pull/5273typing.Final for mutable-class-default annotations (RUF012) by @charliermarsh in https://github.com/astral-sh/ruff/pull/5274deprecated-import (UP035) to prefer typing_extensions in some versions by @tjkuson in https://github.com/astral-sh/ruff/pull/5291Full Changelog: https://github.com/astral-sh/ruff/compare/v0.0.274...v0.0.275
<!-- Release notes generated using configuration in .github/release.yml at v0.0.274 -->
<!-- Release notes generated using configuration in .github/release.yml at v0.0.274 -->
Follow-up release to v0.0.273 to fix a panic in cache accesses.
.unwrap() on cache access by @charliermarsh in https://github.com/astral-sh/ruff/pull/5229RUF010 to remove unnecessary str calls by @charliermarsh in https://github.com/astral-sh/ruff/pull/5232Full Changelog: https://github.com/astral-sh/ruff/compare/v0.0.273...v0.0.274
<!-- Release notes generated using configuration in .github/release.yml at main -->
<!-- Release notes generated using configuration in .github/release.yml at main -->
Highlights include:
flake8-import-conventions, which require symbol renames across a file.copyright] Implement copyright notice detection by @Ryang20718 in https://github.com/astral-sh/ruff/pull/4701flake8-datetimez] Enable UTC-import for datetime-utc-alias fix by @charliermarsh in https://github.com/astral-sh/ruff/pull/5100flake8-implicit-str-concat] Add autofix for ISC001 by @tkukushkin in https://github.com/astral-sh/ruff/pull/4853flake8-import-conventions] Enable autofix for unconventional imports rule by @charliermarsh in https://github.com/astral-sh/ruff/pull/5152flake8-pyi] Add autofix for Set-to-AbstractSet rewrite using reference tracking by @charliermarsh in https://github.com/astral-sh/ruff/pull/5074flake8-pyi] Implement PYI044 by @Thomasdezeeuw in https://github.com/astral-sh/ruff/pull/5021flake8-return] Extend revised RET504 implementation to with statements by @charliermarsh in https://github.com/astral-sh/ruff/pull/4998flake8-return] Implement autofix for revised RET504 rule by @charliermarsh in https://github.com/astral-sh/ruff/pull/4999flake8-return] Refactor RET504 to only enforce assignment-then-return pattern by @charliermarsh in https://github.com/astral-sh/ruff/pull/4997flake8-slots] Add plugin, add SLOT000, SLOT001 and SLOT002 by @qdegraaf in https://github.com/astral-sh/ruff/pull/4909perflint] Add perflint plugin, add first rule PERF102 by @qdegraaf in https://github.com/astral-sh/ruff/pull/4821pylint] Add Pylint rule comparison-with-itself (R0124) by @tjkuson in https://github.com/astral-sh/ruff/pull/4957pyupgrade] Add a rule to remove unnecessary parentheses in class definitions by @charliermarsh in https://github.com/astral-sh/ruff/pull/5032ruff] Add a rule for static keys in dict comprehensions by @rodjunger in https://github.com/astral-sh/ruff/pull/4929ruff] Add rule to disallow implicit optional with autofix by @dhruvmanila in https://github.com/astral-sh/ruff/pull/4831ruff] Expand RUF008 to all classes, but to a new code (RUF012) by @adampauls in https://github.com/astral-sh/ruff/pull/4390ruff] Remove unannotated attributes from RUF008 by @charliermarsh in https://github.com/astral-sh/ruff/pull/5049ruff] Upgrade explicit-type-conversion rule (RUF010) to remove unnecessary str calls by @charliermarsh in https://github.com/astral-sh/ruff/pull/4971-o/--output-file) to write output to a file by @dhruvmanila in https://github.com/astral-sh/ruff/pull/4950__all__ by @charliermarsh in https://github.com/astral-sh/ruff/pull/4967pytest.fail by @charliermarsh in https://github.com/astral-sh/ruff/pull/5040async with in redefined-loop-name by @charliermarsh in https://github.com/astral-sh/ruff/pull/5125DJ008 enforcement in stub files by @charliermarsh in https://github.com/astral-sh/ruff/pull/5139TypedDict conversion logic for shadowed builtins and dunder methods by @charliermarsh in https://github.com/astral-sh/ruff/pull/5038__all__ definitions for docstring visibility by @charliermarsh in https://github.com/astral-sh/ruff/pull/5052reimplemented-builtin if using await by @tjkuson in https://github.com/astral-sh/ruff/pull/5101__future__ imports by @charliermarsh in https://github.com/astral-sh/ruff/pull/5128W293 by @evanrittenhouse in https://github.com/astral-sh/ruff/pull/5172Full Changelog: https://github.com/astral-sh/ruff/compare/v0.0.272...v0.0.273
<!-- Release notes generated using configuration in .github/release.yml at main -->
<!-- Release notes generated using configuration in .github/release.yml at main -->
flake8-pyi] Implement PYI050 by @density in https://github.com/charliermarsh/ruff/pull/4884dict.get fix before ternary rewrite by @charliermarsh in https://github.com/charliermarsh/ruff/pull/4944C413 fix as suggested for reversed call by @dhruvmanila in https://github.com/charliermarsh/ruff/pull/4891B905 by @kyoto7250 in https://github.com/charliermarsh/ruff/pull/4914Full Changelog: https://github.com/charliermarsh/ruff/compare/v0.0.271...v0.0.272
<!-- Release notes generated using configuration in .github/release.yml at main -->
<!-- Release notes generated using configuration in .github/release.yml at main -->
airflow] Add AIR001: task variable name should be same as task_id arg by @jlaneve in https://github.com/charliermarsh/ruff/pull/4687flake8-bandit] Implement S609, linux_commands_wildcard_injection by @scop in https://github.com/charliermarsh/ruff/pull/4504flake8-bugbear] Move duplicate-value rule to flake8-bugbear by @charliermarsh in https://github.com/charliermarsh/ruff/pull/4882flake8-fixme] Implement flake8_fixme and refactor TodoDirective by @evanrittenhouse in https://github.com/charliermarsh/ruff/pull/4681flake8-future-annotations] Implement FA102 by @akx in https://github.com/charliermarsh/ruff/pull/4702flake8-pyi] Add PYI024 for flake8-pyi plugin by @qdegraaf in https://github.com/charliermarsh/ruff/pull/4756flake8-pyi] Add PYI034 for flake8-pyi plugin by @qdegraaf in https://github.com/charliermarsh/ruff/pull/4764flake8-pyi] Add PYI032 rule with autofix by @qdegraaf in https://github.com/charliermarsh/ruff/pull/4695flake8-pyi] Add autofix for PYI010 by @qdegraaf in https://github.com/charliermarsh/ruff/pull/4634flake8-pyi] Implement PYI029 by @density in https://github.com/charliermarsh/ruff/pull/4851flake8-pyi] Implement PYI035 by @density in https://github.com/charliermarsh/ruff/pull/4820flake8-pyi] Implement PYI048 for flake8-pyi plugin by @qdegraaf in https://github.com/charliermarsh/ruff/pull/4645flake8-pyi] Implement PYI053 by @density in https://github.com/charliermarsh/ruff/pull/4770flake8-pyi] Implement PYI054 by @density in https://github.com/charliermarsh/ruff/pull/4775flake8-pyi] Implement PYI025 by @qdegraaf in https://github.com/charliermarsh/ruff/pull/4791flake8-pyi] Implement PYI045 by @density in https://github.com/charliermarsh/ruff/pull/4700pylint] Add Pylint rule C0208 (use-sequence-for-iteration) as PLC0208 (iteration-over-set) by @tjkuson in https://github.com/charliermarsh/ruff/pull/4706pylint] Add autofix for PLR1701 (repeated-isinstance-calls) by @dhruvmanila in https://github.com/charliermarsh/ruff/pull/4792pylint] Implement Pylint's yield-inside-async-function rule (PLE1700) by @chanman3388 in https://github.com/charliermarsh/ruff/pull/4668pylint] implement E307 for pylint invalid str return type by @Ryang20718 in https://github.com/charliermarsh/ruff/pull/4854ruff] Lint pyproject.toml by @konstin in https://github.com/charliermarsh/ruff/pull/4496tryceratops] Ignore error calls with exc_info in TRY400 by @charliermarsh in https://github.com/charliermarsh/ruff/pull/4797pyflakes.extend-generics setting by @JonathanPlasse in https://github.com/charliermarsh/ruff/pull/4677B024 by @charliermarsh in https://github.com/charliermarsh/ruff/pull/4647async for formatting by @charliermarsh in https://github.com/charliermarsh/ruff/pull/4675join() arguments are strings by @evanrittenhouse in https://github.com/charliermarsh/ruff/pull/4834__all__ by @charliermarsh in https://github.com/charliermarsh/ruff/pull/4885Full Changelog: https://github.com/charliermarsh/ruff/compare/v0.0.270...v0.0.271
<!-- Release notes generated using configuration in .github/release.yml at main -->
<!-- Release notes generated using configuration in .github/release.yml at main -->
flake8-bandit] Implement paramiko-call (S601) by @scop in https://github.com/charliermarsh/ruff/pull/4500flake8-pyi] Add autofix for PYI009 by @qdegraaf in https://github.com/charliermarsh/ruff/pull/4583flake8-pyi] Implement PYI013 by @density in https://github.com/charliermarsh/ruff/pull/4517pylint] Add duplicate-value (W0130) by @hoel-bagard in https://github.com/charliermarsh/ruff/pull/4515pylint] Add named_expr_without_context (W0131) by @hoel-bagard in https://github.com/charliermarsh/ruff/pull/4531ruff] Extend RUF005 to recursive and literal-literal concatenations by @hoel-bagard in https://github.com/charliermarsh/ruff/pull/4557ruff] Make ambiguous-unicode detection sensitive to 'word' context by @charliermarsh in https://github.com/charliermarsh/ruff/pull/4552ruff] Name ambiguous characters by @covracer in https://github.com/charliermarsh/ruff/pull/4448--extend-fixable option by @charliermarsh in https://github.com/charliermarsh/ruff/pull/4297extend-per-file-ignores setting by @aacunningham in https://github.com/charliermarsh/ruff/pull/4265# isort: split comment detection in nested blocks by @charliermarsh in https://github.com/charliermarsh/ruff/pull/4584__qualname__, __module__, and __class__ by @charliermarsh in https://github.com/charliermarsh/ruff/pull/4512#region code folding marks in eradicate rules by @charliermarsh in https://github.com/charliermarsh/ruff/pull/4546tab-size to correcly calculate the line length with tabulations by @JonathanPlasse in https://github.com/charliermarsh/ruff/pull/4167TypeVar and NewType name arguments by @charliermarsh in https://github.com/charliermarsh/ruff/pull/4627Message sorting performance by @MichaReiser in https://github.com/charliermarsh/ruff/pull/4624Full Changelog: https://github.com/charliermarsh/ruff/compare/v0.0.269...v0.0.270
<!-- Release notes generated using configuration in .github/release.yml at main -->
<!-- Release notes generated using configuration in .github/release.yml at main -->
(This is a rerelease of v0.0.268, which didn't make it to PyPI due to user error. As such, the release notes are copied below.)
pycodestyleThis 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.
pyupgrade] Remove keep-runtime-typing setting by @charliermarsh in https://github.com/charliermarsh/ruff/pull/4427pylint] Add duplicate-bases rule by @alonme in https://github.com/charliermarsh/ruff/pull/4411pylint] Fix PLW3301 auto-fix with generators by @JonathanPlasse in https://github.com/charliermarsh/ruff/pull/4412flake8-async] Implement flake8-async plugin by @qdegraaf in https://github.com/charliermarsh/ruff/pull/4432pyupgrade] Enable automatic rewrites of typing.Deque and typing.DefaultDict by @charliermarsh in https://github.com/charliermarsh/ruff/pull/4420flake8-pyi] Implement unannotated-assignment-in-stub (PY052) by @sladyn98 in https://github.com/charliermarsh/ruff/pull/4293tryceratops] Implement TRY302 - raise after except by @john-h-k in https://github.com/charliermarsh/ruff/pull/4461flake8-bandit] Improve SQL injection detection logic (S608) by @scop in https://github.com/charliermarsh/ruff/pull/4499flake8-todos] Implement flake8_todos by @evanrittenhouse in https://github.com/charliermarsh/ruff/pull/3921flake8-future-annotations] Implement flake8-future-annotations FA100 by @TylerYep in https://github.com/charliermarsh/ruff/pull/3979pycodestyle rules by @charliermarsh in https://github.com/charliermarsh/ruff/pull/3689pycodestyle rules under new "nursery" category by @charliermarsh in https://github.com/charliermarsh/ruff/pull/4407RUF010 autofix within f-strings by @JonathanPlasse in https://github.com/charliermarsh/ruff/pull/4423pd#at and friends on non-subscripts by @charliermarsh in https://github.com/charliermarsh/ruff/pull/4474Full Changelog: https://github.com/charliermarsh/ruff/compare/v0.0.267...v0.0.269
<!-- Release notes generated using configuration in .github/release.yml at main -->
<!-- Release notes generated using configuration in .github/release.yml at main -->
Follow-up release to v0.0.266 to fix an issue with python -m ruff- and import ruff-based workflows.
(No new rules or functionality.)
RUF010 to detect explicit type conversions within f-strings by @LotemAm in https://github.com/charliermarsh/ruff/pull/4387Full Changelog: https://github.com/charliermarsh/ruff/compare/v0.0.266...v0.0.267
Remove deprecated update-check setting by @charliermarsh in https://github.com/charliermarsh/ruff/pull/4313
<!-- Release notes generated using configuration in .github/release.yml at main -->
update-check setting by @charliermarsh in https://github.com/charliermarsh/ruff/pull/4313pygrep-hooks] Implement pygrep-hook's Mock-mistake diagnostic by @charliermarsh in https://github.com/charliermarsh/ruff/pull/4366pylint] Implement nested-min-max (W3301) by @mccullocht in https://github.com/charliermarsh/ruff/pull/4200flynt] Implement Flynt static string join transform as FLY002 by @akx in https://github.com/charliermarsh/ruff/pull/4196pylint] Include positional- and keyword-only arguments in too-many-arguments by @charliermarsh in https://github.com/charliermarsh/ruff/pull/4329ruff] Update confusable character mapping by @akx in https://github.com/charliermarsh/ruff/pull/4274PD002 in a lambda expression by @dhruvmanila in https://github.com/charliermarsh/ruff/pull/4286D403 if first char cannot be uppercased by @dhruvmanila in https://github.com/charliermarsh/ruff/pull/4283not not a as bool(a) in boolean contexts by @charliermarsh in https://github.com/charliermarsh/ruff/pull/4294TRY301 exceptions without except handlers by @charliermarsh in https://github.com/charliermarsh/ruff/pull/4301ListComp brackets in C419 by @dhruvmanila in https://github.com/charliermarsh/ruff/pull/4099__all__ imports when determining definition visibility by @charliermarsh in https://github.com/charliermarsh/ruff/pull/4357flake8-boolean-trap by @charliermarsh in https://github.com/charliermarsh/ruff/pull/4385.encode calls on parenthesized expressions by @charliermarsh in https://github.com/charliermarsh/ruff/pull/4338SyntaxErrors before newline character by @MichaReiser in https://github.com/charliermarsh/ruff/pull/4124Full Changelog: https://github.com/charliermarsh/ruff/compare/v0.0.265...v0.0.266
<!-- Release notes generated using configuration in .github/release.yml at main -->
<!-- Release notes generated using configuration in .github/release.yml at main -->
--fix-only exit semantics to mirror --fix by @charliermarsh in https://github.com/charliermarsh/ruff/pull/4146flake8-pyi] Implement PYI042 and PYI043 by @arya-k in https://github.com/charliermarsh/ruff/pull/4214pylint] Implement import-self (W0406) by @chanman3388 in https://github.com/charliermarsh/ruff/pull/4154--show-settings output by @dhruvmanila in https://github.com/charliermarsh/ruff/pull/4199Full Changelog: https://github.com/charliermarsh/ruff/compare/v0.0.264...v0.0.265
<!-- Release notes generated using configuration in .github/release.yml at 8cb76f85eba1c970a8c800348fd1e0c874621a57 -->
<!-- Release notes generated using configuration in .github/release.yml at 8cb76f85eba1c970a8c800348fd1e0c874621a57 -->
EM101, EM102, EM103 if possible by @dhruvmanila in https://github.com/charliermarsh/ruff/pull/4123argfile by @charliermarsh in https://github.com/charliermarsh/ruff/pull/4087pyright comment prefix from PYI033 checks by @evanrittenhouse in https://github.com/charliermarsh/ruff/pull/4152E713 and E714 false positives for multiple comparisons by @JonathanPlasse in https://github.com/charliermarsh/ruff/pull/4083NamedExpr assignments by @charliermarsh in https://github.com/charliermarsh/ruff/pull/4145pytest.param by @charliermarsh in https://github.com/charliermarsh/ruff/pull/4176Location with byte-offsets. by @MichaReiser in https://github.com/charliermarsh/ruff/pull/3931memchr to speedup newline search on x86 by @MichaReiser in https://github.com/charliermarsh/ruff/pull/3985ScopeStack in favor of child-parent ScopeId pointers by @charliermarsh in https://github.com/charliermarsh/ruff/pull/4138Full Changelog: https://github.com/charliermarsh/ruff/compare/v0.0.263...v0.0.264
<!-- Release notes generated using configuration in .github/release.yml at main -->
<!-- Release notes generated using configuration in .github/release.yml at main -->
flake8-bugbear] Add pytest.raises(Exception) support to B017 by @alanhdu in https://github.com/charliermarsh/ruff/pull/4052flake8-import-conventions] Implement new rule ICN003 to ban from ... import ... for selected modules by @edgarrmondragon in https://github.com/charliermarsh/ruff/pull/4040pylint] Implement PLE0302 unexpected-special-method-signature by @mccullocht in https://github.com/charliermarsh/ruff/pull/4075pep8-naming] Ignore N815 for TypedDict fields by @JonathanPlasse in https://github.com/charliermarsh/ruff/pull/4066PYI015 for valid default value without annotation by @dhruvmanila in https://github.com/charliermarsh/ruff/pull/4043RUF008 if field annotation is immutable by @dhruvmanila in https://github.com/charliermarsh/ruff/pull/4039ClassVar annotation for RUF008, RUF009 by @dhruvmanila in https://github.com/charliermarsh/ruff/pull/4081Full Changelog: https://github.com/charliermarsh/ruff/compare/v0.0.262...v0.0.263
<!-- Release notes generated using configuration in .github/release.yml at main -->
<!-- Release notes generated using configuration in .github/release.yml at main -->
include by @charliermarsh in https://github.com/charliermarsh/ruff/pull/3914flake8-simplify] Add autofix for contextlib.suppress (SIM105) by @leiserfg in https://github.com/charliermarsh/ruff/pull/3915flake8-bandit] Ignore assert errors (S101) in TYPE_CHECKING blocks by @charliermarsh in https://github.com/charliermarsh/ruff/pull/3960flake8-comprehensions] Implement unnecessary-literal-within-dict-call (C418) by @charliermarsh in https://github.com/charliermarsh/ruff/pull/3969ruff] Add checks for mutable defaults dataclasses by @mosauter in https://github.com/charliermarsh/ruff/pull/3877flake8-import-conventions] Add a rule for BannedImportAlias by @stancld in https://github.com/charliermarsh/ruff/pull/3926flake8-pyi] Implement duplicate types in unions (PYI016) by @USER-5 in https://github.com/charliermarsh/ruff/pull/3922flake8-bandit] Implement flake8-bandit shell injection rules by @robyoung in https://github.com/charliermarsh/ruff/pull/3924flake8-comprehensions] Redirect PIE802 to C419 by @charliermarsh in https://github.com/charliermarsh/ruff/pull/3971E712 message by @charliermarsh in https://github.com/charliermarsh/ruff/pull/3962RET504 by @charliermarsh in https://github.com/charliermarsh/ruff/pull/4004PLW2901 when using typing cast by @dhruvmanila in https://github.com/charliermarsh/ruff/pull/3891@override methods by @charliermarsh in https://github.com/charliermarsh/ruff/pull/3912C414 by @dhruvmanila in https://github.com/charliermarsh/ruff/pull/3916*args present for F523 by @dhruvmanila in https://github.com/charliermarsh/ruff/pull/3923pyright: ignore comments by @charliermarsh in https://github.com/charliermarsh/ruff/pull/3941pygrep-hooks rules by @charliermarsh in https://github.com/charliermarsh/ruff/pull/3942typing_extensions.TypeVar assignments in .pyi files by @charliermarsh in https://github.com/charliermarsh/ruff/pull/3951UP031) for hanging modulos by @charliermarsh in https://github.com/charliermarsh/ruff/pull/3953PT006 by @dhruvmanila in https://github.com/charliermarsh/ruff/pull/3955E731 by @dhruvmanila in https://github.com/charliermarsh/ruff/pull/3983SIM112) by @charliermarsh in https://github.com/charliermarsh/ruff/pull/3988banned-api rules by @charliermarsh in https://github.com/charliermarsh/ruff/pull/4024banned-api enforcement by @charliermarsh in https://github.com/charliermarsh/ruff/pull/4025Full Changelog: https://github.com/charliermarsh/ruff/compare/v0.0.261...v0.0.262
<!-- Release notes generated using configuration in .github/release.yml at main -->
<!-- Release notes generated using configuration in .github/release.yml at main -->
flake8-simplify] Ignore collapsible-if violations for if False: and if True: by @JonathanPlasse in https://github.com/charliermarsh/ruff/pull/3732flake8-pie] Extend unncessary-generator-any-all to set comprehensions by @charliermarsh in https://github.com/charliermarsh/ruff/pull/3824flake8-simplify] Implement dict-get-with-none-default (SIM910) by @kyoto7250 in https://github.com/charliermarsh/ruff/pull/3874flake8-annotations] Additional simple magic return types by @dhruvmanila in https://github.com/charliermarsh/ruff/pull/3805flake8-pyi]: fix PYI015 false positive on assignment of TypeVar & friends by @bluetech in https://github.com/charliermarsh/ruff/pull/3861encode calls by @charliermarsh in https://github.com/charliermarsh/ruff/pull/3802inplace removal by @charliermarsh in https://github.com/charliermarsh/ruff/pull/3804Name expressions in duplicate-isinstance-call by @charliermarsh in https://github.com/charliermarsh/ruff/pull/3817unnecessary-comprehension-any-all for async generators by @charliermarsh in https://github.com/charliermarsh/ruff/pull/3823is_module_name() and improve perf of is_identifier() by @JonathanPlasse in https://github.com/charliermarsh/ruff/pull/3795B031 by @dhruvmanila in https://github.com/charliermarsh/ruff/pull/3844logging module only by @dhruvmanila in https://github.com/charliermarsh/ruff/pull/3878ImportMap from module path to imported dependencies by @chanman3388 in https://github.com/charliermarsh/ruff/pull/3243ruff-action (GitHub Action!) by @brucearctor in https://github.com/charliermarsh/ruff/pull/3857Full Changelog: https://github.com/charliermarsh/ruff/compare/v0.0.260...v0.0.261
<!-- Release notes generated using configuration in .github/release.yml at main -->
<!-- Release notes generated using configuration in .github/release.yml at main -->
flake8-bugbear] Add more immutable functions for B008 by @rouge8 in https://github.com/charliermarsh/ruff/pull/3764flake8-bugbear] Allow pathlib.Path() in B008 by @rouge8 in https://github.com/charliermarsh/ruff/pull/3794flake8-bugbear] Expand the scope of useless-expression (B018) by @charliermarsh in https://github.com/charliermarsh/ruff/pull/3455flake8-bugbear]: Implement rule B031 by @dhruvmanila in https://github.com/charliermarsh/ruff/pull/3680flake8-gettext] Implement flake8-gettext by @leiserfg in https://github.com/charliermarsh/ruff/pull/3785flake8-logging-format] Add support for .log(level, msg) calls in flake8-logging-format by @dhruvmanila in https://github.com/charliermarsh/ruff/pull/3726flake8-logging-format] Allow aliased logging module as a logger candidate by @dhruvmanila in https://github.com/charliermarsh/ruff/pull/3718flake8-pyi] Add autofix for PYI014 by @JonathanPlasse in https://github.com/charliermarsh/ruff/pull/3729flake8-pyi] Implement PYI012 by @JBLDKY in https://github.com/charliermarsh/ruff/pull/3743flake8-pyi] Implement PYI015 by @JonathanPlasse in https://github.com/charliermarsh/ruff/pull/3728flake8-simplify] Fix SIM222 and SIM223 false negative by @JonathanPlasse in https://github.com/charliermarsh/ruff/pull/3740isort]: support submodules in known_(first|third)_party config options by @astaric in https://github.com/charliermarsh/ruff/pull/3768pycodestyle] Use unicode-width to determine line-length instead of character count by @MichaReiser in https://github.com/charliermarsh/ruff/pull/3714pydocstyle] Implement autofix for D403 by @JonathanPlasse in https://github.com/charliermarsh/ruff/pull/3731pylint] Avoid useless-import alias (C0414) in .pyi files by @charliermarsh in https://github.com/charliermarsh/ruff/pull/3761pylint] Exempt PLR1711 and RET501 if non-None annotation by @JonathanPlasse in https://github.com/charliermarsh/ruff/pull/3705tryceratops] Exempt return with side effects for TRY300 by @JonathanPlasse in https://github.com/charliermarsh/ruff/pull/3780ForwardRef contents as type references by @charliermarsh in https://github.com/charliermarsh/ruff/pull/3698with statements in complexity calculation by @charliermarsh in https://github.com/charliermarsh/ruff/pull/3771pep8-naming import rules by @charliermarsh in https://github.com/charliermarsh/ruff/pull/3772TID252 to fix all valid module paths by @JonathanPlasse in https://github.com/charliermarsh/ruff/pull/3796wild::args() and add wild as a dependency by @agriyakhetarpal in https://github.com/charliermarsh/ruff/pull/3739Full Changelog: https://github.com/charliermarsh/ruff/compare/v0.0.259...v0.0.260
<!-- Release notes generated using configuration in .github/release.yml at main -->
<!-- Release notes generated using configuration in .github/release.yml at main -->
Follow-up release to v0.0.258 to fix an issue related to rule resolution via select and ignore.
missing_whitespace by @charliermarsh in https://github.com/charliermarsh/ruff/pull/3688Full Changelog: https://github.com/charliermarsh/ruff/compare/v0.0.258...v0.0.259
<!-- Release notes generated using configuration in .github/release.yml at main -->
<!-- Release notes generated using configuration in .github/release.yml at main -->
flake8-comprehensions] Update C416 with dict comprehension (autofixable) by @dhruvmanila in https://github.com/charliermarsh/ruff/pull/3605pylint]: Implement assert-on-string-literal (W0129) by @latonis in https://github.com/charliermarsh/ruff/pull/3610pyupgrade] Convert single-argument %-style format calls by @charliermarsh in https://github.com/charliermarsh/ruff/pull/3600pyupgrade] Flag PEP 585 and PEP 604 violations in quoted annotations by @charliermarsh in https://github.com/charliermarsh/ruff/pull/3593pyupgrade] Enable autofix for annotations within 'simple' string literals by @charliermarsh in https://github.com/charliermarsh/ruff/pull/3657pyflakes] Add autofix functionality for F523 (#3613) by @JonathanPlasse in https://github.com/charliermarsh/ruff/pull/3613flake8-bandit]: Implement deny-list rules for suspicious member calls by @colin99d in https://github.com/charliermarsh/ruff/pull/3239flake8-annotations] Add autofix for ANN204 with magic methods by @JonathanPlasse in https://github.com/charliermarsh/ruff/pull/3633pylint] Implement binary-op-exception (PLW0711) by @latonis in https://github.com/charliermarsh/ruff/pull/3639flake8-django]: Implement rule DJ012 by @dhruvmanila in https://github.com/charliermarsh/ruff/pull/3659pyproject.toml files by @charliermarsh in https://github.com/charliermarsh/ruff/pull/3588D207 & W605 by @vlindhol in https://github.com/charliermarsh/ruff/pull/3609UP032 autofix with adjacent keywords by @JonathanPlasse in https://github.com/charliermarsh/ruff/pull/3636RUF007 fixes for more than two arguments by @JonathanPlasse in https://github.com/charliermarsh/ruff/pull/3654pairwise diagnostics for zip(..., strict=True) by @charliermarsh in https://github.com/charliermarsh/ruff/pull/3669force-sort-within-sections and force-to-top by @bluetech in https://github.com/charliermarsh/ruff/pull/3645open fix with re-bound builtin by @charliermarsh in https://github.com/charliermarsh/ruff/pull/3650F401) in ModuleNotFoundError blocks by @charliermarsh in https://github.com/charliermarsh/ruff/pull/3658Full Changelog: https://github.com/charliermarsh/ruff/compare/v0.0.257...v0.0.258
<!-- Release notes generated using configuration in .github/release.yml at main -->
<!-- Release notes generated using configuration in .github/release.yml at main -->
ruff] Prefer itertools.pairwise() over zip() for successive pairs (RUF007) by @evanrittenhouse in https://github.com/charliermarsh/ruff/pull/3501flake8-bugbear] Add no-explicit-stacklevel (B028) by @johnor in https://github.com/charliermarsh/ruff/pull/3550pylint] invalid-characters-* by @r3m0t in https://github.com/charliermarsh/ruff/pull/3552pylint] Implement useless-return (R1711) by @tomecki in https://github.com/charliermarsh/ruff/pull/3116pylint]: Implement continue-in-finally (E0116) by @latonis in https://github.com/charliermarsh/ruff/pull/3541type overrides in E721 by @charliermarsh in https://github.com/charliermarsh/ruff/pull/3582value > max style in pylint and mccabe messages by @edgarrmondragon in https://github.com/charliermarsh/ruff/pull/3553D209 and D400 by @JonathanPlasse in https://github.com/charliermarsh/ruff/pull/3564Full Changelog: https://github.com/charliermarsh/ruff/compare/v0.0.256...v0.0.257
Add last remaining deprecated typing imports by @charliermarsh in https://github.com/charliermarsh/ruff/pull/3529
<!-- Release notes generated using configuration in .github/release.yml at main -->
math constants in defaults by @XuehaiPan in https://github.com/charliermarsh/ruff/pull/3484not in error message by @Czaki in https://github.com/charliermarsh/ruff/pull/3497# ruff: prefix for isort action comments by @charliermarsh in https://github.com/charliermarsh/ruff/pull/3493Full Changelog: https://github.com/charliermarsh/ruff/compare/v0.0.255...v0.0.256
[pyupgrade] Flag deprecated (but renamed) imports in UP035 by @charliermarsh in https://github.com/charliermarsh/ruff/pull/3448
<!-- Release notes generated using configuration in .github/release.yml at main -->
flake8-pie] Fix PIE802 broken auto-fix with trailing comma by @JonathanPlasse in https://github.com/charliermarsh/ruff/pull/3402flake8-pie] Implement autofix for PIE810 by @kyoto7250 in https://github.com/charliermarsh/ruff/pull/3411flake8-bugbear] Add flake8-bugbear's B030 rule by @aacunningham in https://github.com/charliermarsh/ruff/pull/3400pycodestyle] Add E231 by @carlosmiei in https://github.com/charliermarsh/ruff/pull/3344pyupgrade] Flag deprecated (but renamed) imports in UP035 by @charliermarsh in https://github.com/charliermarsh/ruff/pull/3448pyupgrade] Remap ChainMap, Counter, and OrderedDict imports to collections by @charliermarsh in https://github.com/charliermarsh/ruff/pull/3392pylint] C1901: compare-to-empty-string by @AreamanM in https://github.com/charliermarsh/ruff/pull/3405pylint] Implement W1508 invalid-envvar-default by @latonis in https://github.com/charliermarsh/ruff/pull/3449pylint] Implement E1507 invalid-envvar-value by @latonis in https://github.com/charliermarsh/ruff/pull/3467target-version from project metadata by @JonathanPlasse in https://github.com/charliermarsh/ruff/pull/3470runtime-evaluated-decorators and runtime-evaluated-base-classes for flake8-type-checking by @sasanjac in https://github.com/charliermarsh/ruff/pull/3292--format option. by @StefanBRas in https://github.com/charliermarsh/ruff/pull/3335Bool / Float / Complex numbers as simple defaults by @XuehaiPan in https://github.com/charliermarsh/ruff/pull/3459extend points at a non-existent ruff.toml file. by @DanCardin in https://github.com/charliermarsh/ruff/pull/3417--show-fixes with --fix-only by @charliermarsh in https://github.com/charliermarsh/ruff/pull/3426OSError-aliased handlers by @charliermarsh in https://github.com/charliermarsh/ruff/pull/3451CI_PROJECT_DIR by @charliermarsh in https://github.com/charliermarsh/ruff/pull/3475Full Changelog: https://github.com/charliermarsh/ruff/compare/v0.0.254...v0.0.255
<!-- Release notes generated using configuration in .github/release.yml at main -->
<!-- Release notes generated using configuration in .github/release.yml at main -->
pyupgrade] Replace tuples with type union in isinstance or issubclass calls by @martinlehoux in https://github.com/charliermarsh/ruff/pull/3280flake8-pyi] Add flake-pyi PYI033 "Do not use type comments in stubs" by @konstin in https://github.com/charliermarsh/ruff/pull/3302flake8-pyi] PYI006 bad version info comparison by @konstin in https://github.com/charliermarsh/ruff/pull/3291pycodestyle] feat(E251,E252): add rules by @carlosmiei in https://github.com/charliermarsh/ruff/pull/3274pycodestyle] feat(E211): add rule + autofix by @carlosmiei in https://github.com/charliermarsh/ruff/pull/3313pycodestyle] feat(e225,226,227,228): add rules by @carlosmiei in https://github.com/charliermarsh/ruff/pull/3300pycodestyle] feat(W191): add indentation_contains_tabs by @carlosmiei in https://github.com/charliermarsh/ruff/pull/3249RUF004 to B026 by @charliermarsh in https://github.com/charliermarsh/ruff/pull/3293--ignore-noqa CLI flag to force-ignore noqa directives by @charliermarsh in https://github.com/charliermarsh/ruff/pull/3296property-decorators configuration option for pydocstyle by @staticssleever668 in https://github.com/charliermarsh/ruff/pull/3311@classmethod and @staticmethod in decorator lists by @charliermarsh in https://github.com/charliermarsh/ruff/pull/3314RET503 autofixes to "end of statement", including comments by @charliermarsh in https://github.com/charliermarsh/ruff/pull/3324identifier_range for a few more rules by @charliermarsh in https://github.com/charliermarsh/ruff/pull/3254Path(...) in Pathlib violations by @evanrittenhouse in https://github.com/charliermarsh/ruff/pull/3333Full Changelog: https://github.com/charliermarsh/ruff/compare/v0.0.253...v0.0.254
<!-- Release notes generated using configuration in .github/release.yml at 386ca7c9a1bb7ebeb1457b605695c6a09e67092b -->
<!-- Release notes generated using configuration in .github/release.yml at 386ca7c9a1bb7ebeb1457b605695c6a09e67092b -->
pyupgrade] Avoid rewriting any PEP 604 runtime annotations by @charliermarsh in https://github.com/charliermarsh/ruff/pull/3217pycodestyle] Missing whitespace after keyword by @carlosmiei in https://github.com/charliermarsh/ruff/pull/3225pycodestyle] trailing-whitespace, blank-line-contains-whitespace (W291, W293) by @mknaw in https://github.com/charliermarsh/ruff/pull/3122flake8-pyi]: PYI009, PYI010, PYI021 by @sbdchd in https://github.com/charliermarsh/ruff/pull/3230flake8-pyi]: PYI011, PYI014 by @sbdchd in https://github.com/charliermarsh/ruff/pull/3238flake8-django] DJ003, DJ006, DJ007 by @lkh42t in https://github.com/charliermarsh/ruff/pull/3236pylint] Implement pylint's else-if-used rule (PLR5501) by @chanman3388 in https://github.com/charliermarsh/ruff/pull/3231pylint] W0603: global-statement by @igozali in https://github.com/charliermarsh/ruff/pull/3227flake8-pie] Unnecessary list comprehension, with autofix (PIE802) by @matthewlloyd in https://github.com/charliermarsh/ruff/pull/3149pydocstyle]: Implement ignore-decorators by @edgarrmondragon in https://github.com/charliermarsh/ruff/pull/3229writeln with --show-settings by @charliermarsh in https://github.com/charliermarsh/ruff/pull/3180TypedDict and NamedTuple definitions by @charliermarsh in https://github.com/charliermarsh/ruff/pull/3148flake8-tidy-imports] fix autofix for relative imports by @sciyoshi in https://github.com/charliermarsh/ruff/pull/3197S105/S106/S107 by @edgarrmondragon in https://github.com/charliermarsh/ruff/pull/3222Full Changelog: https://github.com/charliermarsh/ruff/compare/v0.0.252...v0.0.253
<!-- Release notes generated using configuration in .github/release.yml at main -->
<!-- Release notes generated using configuration in .github/release.yml at main -->
pylint] redefined-loop-name (W2901) by @matthewlloyd in https://github.com/charliermarsh/ruff/pull/3022pylint] logging-too-many-args (E1205) by @md384 in https://github.com/charliermarsh/ruff/pull/3084pylint] logging-too-few-args (E1206) by @md384 in https://github.com/charliermarsh/ruff/pull/3084typing.assert_never as no return by @bluetech in https://github.com/charliermarsh/ruff/pull/3121no-lines-before preceded by an empty section by @bluetech in https://github.com/charliermarsh/ruff/pull/3139ManualDictLookup by @Rupt in https://github.com/charliermarsh/ruff/pull/3117Full Changelog: https://github.com/charliermarsh/ruff/compare/v0.0.251...v0.0.252
<!-- Release notes generated using configuration in .github/release.yml at main -->
<!-- Release notes generated using configuration in .github/release.yml at main -->
MatchAs patterns by @charliermarsh in https://github.com/charliermarsh/ruff/pull/3098*args or **kwargs by @charliermarsh in https://github.com/charliermarsh/ruff/pull/3102Full Changelog: https://github.com/charliermarsh/ruff/compare/v0.0.250...v0.0.251
<!-- Release notes generated using configuration in .github/release.yml at main -->
<!-- Release notes generated using configuration in .github/release.yml at main -->
Ruff now supports all Python 3.10 and 3.11 language features, including:
match statements) (PEP 634)except* statements) (PEP 654)flake8-bugbear] Add B029 (except-with-empty-tuple) from flake8-bugbear by @carlosmiei in https://github.com/charliermarsh/ruff/pull/3068flake8-bugbear] Add B032 (unintentional-type-annotation) from flake8_bugbear by @carlosmiei in https://github.com/charliermarsh/ruff/pull/3085tryceratops]: Add TRY401 (verbose-log-messages) by @colin99d in https://github.com/charliermarsh/ruff/pull/3036flake8-simplify]: Add SIM116 (manual-dict-lookup) by @colin99d in https://github.com/charliermarsh/ruff/pull/2767flake8-pytest] Use LibCST to fix chained assertions by @charliermarsh in https://github.com/charliermarsh/ruff/pull/3087flake8-boolean-trap] Avoid boolean-trap rules for positional-only builtin calls by @charliermarsh in https://github.com/charliermarsh/ruff/pull/3075flake8-boolean-trap] Ignore setters in flake8-boolean-trap by @charliermarsh in https://github.com/charliermarsh/ruff/pull/3092flake8-return] Omit while-True loops from implicit return enforcement by @charliermarsh in https://github.com/charliermarsh/ruff/pull/3076Full Changelog: https://github.com/charliermarsh/ruff/compare/v0.0.249...v0.0.250
<!-- Release notes generated using configuration in .github/release.yml at 4cfa350112a82fb631909fc555588f3da8ba5750 -->
<!-- Release notes generated using configuration in .github/release.yml at 4cfa350112a82fb631909fc555588f3da8ba5750 -->
E731 in class bodies by @JoshKarpel in https://github.com/charliermarsh/ruff/pull/3050Full Changelog: https://github.com/charliermarsh/ruff/compare/v0.0.248...v0.0.249
<!-- Release notes generated using configuration in .github/release.yml at main -->
<!-- Release notes generated using configuration in .github/release.yml at main -->
numpy] numpy-legacy-random by @sbrugman in https://github.com/charliermarsh/ruff/pull/2960pycodestyle] autofix useless semicolons by @sbrugman in https://github.com/charliermarsh/ruff/pull/3001pep8-naming] Implement flake8-module-naming by @sbrugman in https://github.com/charliermarsh/ruff/pull/2855flake8-self] Ignore namedtuple methods in flake8-self by @charliermarsh in https://github.com/charliermarsh/ruff/pull/2998flake8-simplify] Merge convert-loop-to-any & convert-loop-to-all to reimplemented-builtin by @not-my-profile in https://github.com/charliermarsh/ruff/pull/2903ruff] Add support for ensure_future for RUF006 by @Lunarmagpie in https://github.com/charliermarsh/ruff/pull/2943pylint] error when __init__ returns a value by @r3m0t in https://github.com/charliermarsh/ruff/pull/3007flake8-pytest-style] autofix for composite-assertion (PT018) by @sbrugman in https://github.com/charliermarsh/ruff/pull/2732flake8-tidy-imports] extend autofix of relative imports by @sbrugman in https://github.com/charliermarsh/ruff/pull/2990noqa directives by @charliermarsh in https://github.com/charliermarsh/ruff/pull/2978B027 violations in .pyi files by @JonathanPlasse in https://github.com/charliermarsh/ruff/pull/3016Full Changelog: https://github.com/charliermarsh/ruff/compare/v0.0.247...v0.0.248
[NPY001] deprecated type aliases by @sbrugman in https://github.com/charliermarsh/ruff/pull/2810
<!-- Release notes generated using configuration in .github/release.yml at main -->
NPY001] deprecated type aliases by @sbrugman in https://github.com/charliermarsh/ruff/pull/2810RUF006] Implement asyncio-dangling-task to track asyncio.create_task calls by @charliermarsh in https://github.com/charliermarsh/ruff/pull/2935flake8-tidy-imports] autofix relative imports by @sbrugman in https://github.com/charliermarsh/ruff/pull/2891elif branches by @charliermarsh in https://github.com/charliermarsh/ruff/pull/2881Full Changelog: https://github.com/charliermarsh/ruff/compare/v0.0.246...v0.0.247
<!-- Release notes generated using configuration in .github/release.yml at main -->
<!-- Release notes generated using configuration in .github/release.yml at main -->
flake8-pyi]: add rules for unrecognized platform check (PYI007, PYI008) by @SigureMo in https://github.com/charliermarsh/ruff/pull/2805flake8-simplify]: combine-if-conditions by @colin99d in https://github.com/charliermarsh/ruff/pull/2823flake8-django] Implemented flake8-django plugin rules by @konysko in https://github.com/charliermarsh/ruff/pull/2586config subcommand by @not-my-profile in https://github.com/charliermarsh/ruff/pull/2775--show-fixes flag to show applied fixes by @charliermarsh in https://github.com/charliermarsh/ruff/pull/2707pyflakes] Support unused variable removal in multi-assignment statements by @charliermarsh in https://github.com/charliermarsh/ruff/pull/2786flake8-comprehensions] autofix C414 and C417 + bugfix by @sbrugman in https://github.com/charliermarsh/ruff/pull/2693flake8-comprehensions] bugfix for C413 autofix by @sbrugman in https://github.com/charliermarsh/ruff/pull/2804flake8-simplify] Use smarter inversion for comparison checks by @charliermarsh in https://github.com/charliermarsh/ruff/pull/2831flake8-comprehensions] improve autofix for C401, C402 and C417 by @sbrugman in https://github.com/charliermarsh/ruff/pull/2806noqa enforcement by @charliermarsh in https://github.com/charliermarsh/ruff/pull/2783Full Changelog: https://github.com/charliermarsh/ruff/compare/v0.0.245...v0.0.246
<!-- Release notes generated using configuration in .github/release.yml at main -->
<!-- Release notes generated using configuration in .github/release.yml at main -->
flake8-pyi]Add flake8-pyi with one rule by @sbdchd in https://github.com/charliermarsh/ruff/pull/2682pylint]: bad-string-format-type by @colin99d in https://github.com/charliermarsh/ruff/pull/2572pylint]: yield-in-init by @tomecki in https://github.com/charliermarsh/ruff/pull/2716flake8-tidy-imports] Implement autofix for relative imports (TID252) by @sbrugman in https://github.com/charliermarsh/ruff/pull/2739flake8-bandit]: try-except-continue by @colin99d in https://github.com/charliermarsh/ruff/pull/2674flake8-bandit] Implement bandit's 'hardcoded-sql-expressions' S608 by @mattoberle in https://github.com/charliermarsh/ruff/pull/2698pycodestyle] Implement compound-statements (E701, E702, E703, E704) by @charliermarsh in https://github.com/charliermarsh/ruff/pull/2680# noqa: E999 directives by @charliermarsh in https://github.com/charliermarsh/ruff/pull/2697Path.readlink() behind Python 3.9+ guard by @charliermarsh in https://github.com/charliermarsh/ruff/pull/2708__all__ members as used at end-of-scope by @charliermarsh in https://github.com/charliermarsh/ruff/pull/2733__all__ bindings for global scope by @charliermarsh in https://github.com/charliermarsh/ruff/pull/2738function_type::classify for yield-in-init by @charliermarsh in https://github.com/charliermarsh/ruff/pull/2742Full Changelog: https://github.com/charliermarsh/ruff/compare/v0.0.244...v0.0.245
<!-- Release notes generated using configuration in .github/release.yml at main -->
<!-- Release notes generated using configuration in .github/release.yml at main -->
pylint]: bidirectional-unicode by @colin99d in https://github.com/charliermarsh/ruff/pull/2589--exit-non-zero-on-fix by @charliermarsh in https://github.com/charliermarsh/ruff/pull/2668explanation method on Rule struct via rustdoc by @charliermarsh in https://github.com/charliermarsh/ruff/pull/2642__setitem__ by @charliermarsh in https://github.com/charliermarsh/ruff/pull/2636.py wrt. implicit namespace package by @scop in https://github.com/charliermarsh/ruff/pull/2640@pytest.mark.parametrize decorators by @charliermarsh in https://github.com/charliermarsh/ruff/pull/2662Full Changelog: https://github.com/charliermarsh/ruff/compare/v0.0.243...v0.0.244
<!-- Release notes generated using configuration in .github/release.yml at main -->
<!-- Release notes generated using configuration in .github/release.yml at main -->
typing.NamedTuple and typing.TypedDict treatment by @scop in https://github.com/charliermarsh/ruff/pull/2611ignore-names for all relevant pep8-naming rules by @charliermarsh in https://github.com/charliermarsh/ruff/pull/2617Full Changelog: https://github.com/charliermarsh/ruff/compare/v0.0.242...v0.0.243
<!-- Release notes generated using configuration in .github/release.yml at main -->
<!-- Release notes generated using configuration in .github/release.yml at main -->
too-many-branches rule (PLR0912) by @chanman3388 in https://github.com/charliermarsh/ruff/pull/2550too-many-return-statements rule (PLR0911) by @chanman3388 in https://github.com/charliermarsh/ruff/pull/2564pyupgrade]: Removes quotes from annotations by @colin99d in https://github.com/charliermarsh/ruff/pull/2431pylint]: bad-str-strip-call by @colin99d in https://github.com/charliermarsh/ruff/pull/2570mypy and SPDX-License-Identifier false positives by @scop in https://github.com/charliermarsh/ruff/pull/2587Full Changelog: https://github.com/charliermarsh/ruff/compare/v0.0.241...v0.0.242
Soft-deprecate update-check by @akx in https://github.com/charliermarsh/ruff/pull/2530
<!-- Release notes generated using configuration in .github/release.yml at main -->
update-check by @akx in https://github.com/charliermarsh/ruff/pull/2530known-standard-library for each Python version by @JonathanPlasse in https://github.com/charliermarsh/ruff/pull/2491flake8-self] Fix False Negative Issue on Rule SLF001 by @saadmk11 in https://github.com/charliermarsh/ruff/pull/2527--show-files by @charliermarsh in https://github.com/charliermarsh/ruff/pull/2543implicit-namespace-package by @charliermarsh in https://github.com/charliermarsh/ruff/pull/2560list() and tuple() calls in __all__ assignments by @charliermarsh in https://github.com/charliermarsh/ruff/pull/2499Full Changelog: https://github.com/charliermarsh/ruff/compare/v0.0.240...v0.0.241
<!-- Release notes generated using configuration in .github/release.yml at main -->
<!-- Release notes generated using configuration in .github/release.yml at main -->
pyupgrade]: Remove outdated sys.version_info blocks by @colin99d in https://github.com/charliermarsh/ruff/pull/2099flake8-self] Add Plugin and Rule SLF001 by @saadmk11 in https://github.com/charliermarsh/ruff/pull/2470pylint] Implement pylint's too-many-statements rule (PLR0915) by @chanman3388 in https://github.com/charliermarsh/ruff/pull/2445isort] Support forced_separate by @akx in https://github.com/charliermarsh/ruff/pull/2268isort] Add isort option lines-after-imports by @reidswan in https://github.com/charliermarsh/ruff/pull/2440if 0: and if False: as type-checking blocks by @charliermarsh in https://github.com/charliermarsh/ruff/pull/2485--add-noqa edits by @charliermarsh in https://github.com/charliermarsh/ruff/pull/2465ignore to next config layer if select = [] by @not-my-profile in https://github.com/charliermarsh/ruff/pull/2467Full Changelog: https://github.com/charliermarsh/ruff/compare/v0.0.239...v0.0.240
<!-- Release notes generated using configuration in .github/release.yml at main -->
<!-- Release notes generated using configuration in .github/release.yml at main -->
pyupgrade] Implement import-replacement rule (UP035) by @colin99d in https://github.com/charliermarsh/ruff/pull/2049flake8-raise] Add Plugin and RSE102 Rule by @saadmk11 in https://github.com/charliermarsh/ruff/pull/2354flake8-quotes] Allow implicit multiline strings with internal quotes to use non-preferred quote by @charliermarsh in https://github.com/charliermarsh/ruff/pull/2416I001] fix isort check for files with tabs and no indented blocks by @sciyoshi in https://github.com/charliermarsh/ruff/pull/2374Full Changelog: https://github.com/charliermarsh/ruff/compare/v0.0.238...v0.0.239
<!-- Release notes generated using configuration in .github/release.yml at main -->
<!-- Release notes generated using configuration in .github/release.yml at main -->
select, extend-select, ignore, and extend-ignore have new semantics (#2312)Previously, the interplay between select and its related options could lead to unexpected behavior. For example, ruff --select E501 --ignore ALL and ruff --select E501 --extend-ignore ALL behaved differently. (See #2312 for more examples.)
The new semantics are such that Ruff uses the "highest-priority" select as the basis for the rule set, and then applies any extend-select, ignore, and extend-ignore adjustments. CLI options are given higher priority than pyproject.toml options, and the current pyproject.toml file is given higher priority than any inherited pyproject.toml files.
As an example: ruff --select F401 will select rule F401, and ignore any of the modifiers from the pyproject.toml, as the "highest-priorty" select kicks off the resolution chain.
This change is largely backwards compatible -- most users should experience no change in behavior. For more, see BREAKING_CHANGES.md.
remove-six-compat (UP016) has been removed (#2332)The remove-six-compat rule has been removed. This rule was only useful for one-time Python 2-to-3 upgrades.
too-many-arguments rule (PLR0913) by @akhildevelops in https://github.com/charliermarsh/ruff/pull/2308ruff linter subcommand by @not-my-profile in https://github.com/charliermarsh/ruff/pull/2294exc_info logger rules by @charliermarsh in https://github.com/charliermarsh/ruff/pull/2364TRY201] don't check raise statements in nested exception handlers by @sciyoshi in https://github.com/charliermarsh/ruff/pull/2337I001] fix isort for files with tab-based indentation by @sciyoshi in https://github.com/charliermarsh/ruff/pull/2361Full Changelog: https://github.com/charliermarsh/ruff/compare/v0.0.237...v0.0.238
--explain, --clean, and --generate-shell-completion are now implemented as subcommands (#2190):
--explain, --clean, and --generate-shell-completion are now implemented as subcommands (#2190):
ruff . # Still works! And will always work.
ruff check . # New! Also works.
ruff --explain E402 # Still works.
ruff rule E402 # New! Also works. (And preferred.)
# Oops! The command has to come first.
ruff --format json --explain E402 # No longer works.
ruff --explain E402 --format json # Still works!
ruff rule E402 --format json # Works! (And preferred.)
This change is largely backwards compatible -- most users should experience no change in behavior. For exceptions, see BREAKING_CHANGES.md.
PLE0604 and PLE0605 by @sbrugman in https://github.com/charliermarsh/ruff/pull/2241flake8-bandit] Add Rule S110 (try/except/pass) by @sciyoshi in https://github.com/charliermarsh/ruff/pull/2197if by @akx in https://github.com/charliermarsh/ruff/pull/2269Full Changelog: https://github.com/charliermarsh/ruff/compare/v0.0.236...v0.0.237
feat: implement TRY002 and TRY003 by @karpa4o4 in https://github.com/charliermarsh/ruff/pull/2135
TRY002 and TRY003 by @karpa4o4 in https://github.com/charliermarsh/ruff/pull/2135TRY400 by @Flowake in https://github.com/charliermarsh/ruff/pull/2115flake8-logging-format (G) by @edgarrmondragon in https://github.com/charliermarsh/ruff/pull/2150flake8-typing-imports by @charliermarsh in https://github.com/charliermarsh/ruff/pull/2221exempt-modules setting from flake8-type-checking by @charliermarsh in https://github.com/charliermarsh/ruff/pull/2230try-consider-else by @charliermarsh in https://github.com/charliermarsh/ruff/pull/2228pass statements by @charliermarsh in https://github.com/charliermarsh/ruff/pull/2235pytest in shebang by @charliermarsh in https://github.com/charliermarsh/ruff/pull/2237Full Changelog: https://github.com/charliermarsh/ruff/compare/v0.0.235...v0.0.236
Follow-up release to v0.0.234 to fix two non-fatal issues related to CLI output.
Follow-up release to v0.0.234 to fix two non-fatal issues related to CLI output.
(No new rules or functionality.)
Full Changelog: https://github.com/charliermarsh/ruff/compare/v0.0.234...v0.0.235
Move is_overlong to helpers by @ericroberts in https://github.com/charliermarsh/ruff/pull/2137
#![warn(clippy::pedantic)] to lib.rs and main.rs files by @not-my-profile in https://github.com/charliermarsh/ruff/pull/2148Full Changelog: https://github.com/charliermarsh/ruff/compare/v0.0.233...v0.0.234
This is a rerun of v0.0.232 (unreleased) to address build failures on Windows.
This is a rerun of v0.0.232 (unreleased) to address build failures on Windows.
Full Changelog: https://github.com/charliermarsh/ruff/compare/v0.0.232...v0.0.233
fix: issue D401 only for non-test/property functions and methods by @scop in https://github.com/charliermarsh/ruff/pull/2071
build.rs and other refactors by @not-my-profile in https://github.com/charliermarsh/ruff/pull/2101flake8-bandit] Added Rule S612 (Use of insecure logging.config.listen) by @saadmk11 in https://github.com/charliermarsh/ruff/pull/2108Full Changelog: https://github.com/charliermarsh/ruff/compare/v0.0.230...v0.0.231
fix: pin rustpython to the same revision to fix cargo vendor by @figsoda in https://github.com/charliermarsh/ruff/pull/2069
ropey usages by @charliermarsh in https://github.com/charliermarsh/ruff/pull/2076INP check on package inference by @charliermarsh in https://github.com/charliermarsh/ruff/pull/2079pep8-naming][N806] Don't mark TypeVar & NewType Assignment as Errors by @saadmk11 in https://github.com/charliermarsh/ruff/pull/2085isort options by @shannonrothe in https://github.com/charliermarsh/ruff/pull/2082Dict.keys type by @harupy in https://github.com/charliermarsh/ruff/pull/2086Full Changelog: https://github.com/charliermarsh/ruff/compare/v0.0.229...v0.0.230
README: --force-exclude is already set by @hugovk in https://github.com/charliermarsh/ruff/pull/2042
--force-exclude is already set by @hugovk in https://github.com/charliermarsh/ruff/pull/2042flake8-executable] EXE003-005 by @sbrugman in https://github.com/charliermarsh/ruff/pull/2023flake8-type-checking extension by @charliermarsh in https://github.com/charliermarsh/ruff/pull/2048assert by @harupy in https://github.com/charliermarsh/ruff/pull/2052flake8-builtins] Add builtins-ignorelist Option by @saadmk11 in https://github.com/charliermarsh/ruff/pull/2061Full Changelog: https://github.com/charliermarsh/ruff/compare/v0.0.228...v0.0.229
Pyupgrade: Extraneous parenthesis by @colin99d in https://github.com/charliermarsh/ruff/pull/1926
.astimezone() in call-datetime-strptime-without-zone message by @scop in https://github.com/charliermarsh/ruff/pull/2015scripts/add_*.py by @not-my-profile in https://github.com/charliermarsh/ruff/pull/2016Full Changelog: https://github.com/charliermarsh/ruff/compare/v0.0.227...v0.0.228
Drop RuleCode in favor of Rule enum with human-friendly names by @not-my-profile in https://github.com/charliermarsh/ruff/pull/1941
RuleCode in favor of Rule enum with human-friendly names by @not-my-profile in https://github.com/charliermarsh/ruff/pull/1941SIM109 by @charliermarsh in https://github.com/charliermarsh/ruff/pull/1998Violation::placeholder by @not-my-profile in https://github.com/charliermarsh/ruff/pull/1996SIM201 and SIM202 errors in __ne__ et al by @charliermarsh in https://github.com/charliermarsh/ruff/pull/2001FitsOnOneLine (D200) by @charliermarsh in https://github.com/charliermarsh/ruff/pull/2006elif blocks by @charliermarsh in https://github.com/charliermarsh/ruff/pull/2012Full Changelog: https://github.com/charliermarsh/ruff/compare/v0.0.226...v0.0.227
[isort] Add constants and variables Options by @saadmk11 in https://github.com/charliermarsh/ruff/pull/1951
isort] Add constants and variables Options by @saadmk11 in https://github.com/charliermarsh/ruff/pull/1951isort] Add no-lines-before Option by @saadmk11 in https://github.com/charliermarsh/ruff/pull/1955smallvec for call path representation by @charliermarsh in https://github.com/charliermarsh/ruff/pull/1960SmallVec by @charliermarsh in https://github.com/charliermarsh/ruff/pull/1972Full Changelog: https://github.com/charliermarsh/ruff/compare/v0.0.225...v0.0.226
Define origin names & URLs within doc comments by @not-my-profile in https://github.com/charliermarsh/ruff/pull/1929
@functools.cache rewrites to their own rule by @charliermarsh in https://github.com/charliermarsh/ruff/pull/1938SIM103 with elif by @charliermarsh in https://github.com/charliermarsh/ruff/pull/1944flake8-no-pep420 by @edgarrmondragon in https://github.com/charliermarsh/ruff/pull/1942contextlib.ExitStack() for SIM115 rules by @charliermarsh in https://github.com/charliermarsh/ruff/pull/1946Full Changelog: https://github.com/charliermarsh/ruff/compare/v0.0.224...v0.0.225
Re-run benchmark and update documentation by @charliermarsh in https://github.com/charliermarsh/ruff/pull/1907
flake8_tidy_imports by @not-my-profile in https://github.com/charliermarsh/ruff/pull/1909lru_cache to cache on Python 3.9+ by @charliermarsh in https://github.com/charliermarsh/ruff/pull/1918Full Changelog: https://github.com/charliermarsh/ruff/compare/v0.0.223...v0.0.224
Turn define_rule_mapping! into a procedural macro by @not-my-profile in https://github.com/charliermarsh/ruff/pull/1885
stdout by @charliermarsh in https://github.com/charliermarsh/ruff/pull/1900stdout once when printing diagnostics by @messense in https://github.com/charliermarsh/ruff/pull/1901Full Changelog: https://github.com/charliermarsh/ruff/compare/v0.0.222...v0.0.223
Add support for namespace packages by @charliermarsh in https://github.com/charliermarsh/ruff/pull/1859
SIM117 by @harupy in https://github.com/charliermarsh/ruff/pull/1867Full Changelog: https://github.com/charliermarsh/ruff/compare/v0.0.221...v0.0.222
Document the way extend-ignore/select are applied by @jankatins in https://github.com/charliermarsh/ruff/pull/1839
PLR2004 (MagicValueComparison) by @max0x53 in https://github.com/charliermarsh/ruff/pull/1828flake8-bugbear] Fix False Positives for B024 & B027 by @saadmk11 in https://github.com/charliermarsh/ruff/pull/1851isort] Add classes Config Option by @saadmk11 in https://github.com/charliermarsh/ruff/pull/1849PLR0133 (ComparisonOfConstants) by @max0x53 in https://github.com/charliermarsh/ruff/pull/1841C405 fixes by @charliermarsh in https://github.com/charliermarsh/ruff/pull/1855Full Changelog: https://github.com/charliermarsh/ruff/compare/v0.0.220...v0.0.221
Modify visibility and shuffle around some modules by @charliermarsh in https://github.com/charliermarsh/ruff/pull/1807
flake8-bandit] Add Rule for S701 (jinja2 autoescape false) by @saadmk11 in https://github.com/charliermarsh/ruff/pull/1815reverse_relative setting by @charliermarsh in https://github.com/charliermarsh/ruff/pull/1826SIM110 and SIM111 by @charliermarsh in https://github.com/charliermarsh/ruff/pull/1834Full Changelog: https://github.com/charliermarsh/ruff/compare/v0.0.219...v0.0.220
Disable update check by default by @charliermarsh in https://github.com/charliermarsh/ruff/pull/1786
flake8-simplify] Add Rule for SIM115 (Use context handler for opening files) by @saadmk11 in https://github.com/charliermarsh/ruff/pull/1782ruff into python folder by @messense in https://github.com/charliermarsh/ruff/pull/1806Full Changelog: https://github.com/charliermarsh/ruff/compare/v0.0.218...v0.0.219
Implement flake8-simplify SIM112 by @messense in https://github.com/charliermarsh/ruff/pull/1764
flake8-bandit] Add Rule for S508 (snmp insecure version) & S509 (snmp weak cryptography) by @saadmk11 in https://github.com/charliermarsh/ruff/pull/1771required-imports enforcement by @charliermarsh in https://github.com/charliermarsh/ruff/pull/1762Full Changelog: https://github.com/charliermarsh/ruff/compare/v0.0.217...v0.0.218
Cache build artifacts using Swatinem/rust-cache@v1 by @ducaale in https://github.com/charliermarsh/ruff/pull/1750
sys.version_info and sys.platform checks from ternary rule by @charliermarsh in https://github.com/charliermarsh/ruff/pull/1756scripts to match latest conventions by @charliermarsh in https://github.com/charliermarsh/ruff/pull/1758Full Changelog: https://github.com/charliermarsh/ruff/compare/v0.0.216...v0.0.217
Audit unittest assert methods by @harupy in https://github.com/charliermarsh/ruff/pull/1736
Check to Diagnostic by @charliermarsh in https://github.com/charliermarsh/ruff/pull/1725CheckCategory to RuleOrigin by @charliermarsh in https://github.com/charliermarsh/ruff/pull/1726registry.rs by @charliermarsh in https://github.com/charliermarsh/ruff/pull/1728check to diagnostic by @charliermarsh in https://github.com/charliermarsh/ruff/pull/1738checks and plugins to rules by @charliermarsh in https://github.com/charliermarsh/ruff/pull/1739Full Changelog: https://github.com/charliermarsh/ruff/compare/v0.0.215...v0.0.216
Automatically remove duplicate dictionary keys by @charliermarsh in https://github.com/charliermarsh/ruff/pull/1710
ComparableExpr hierarchy for comparing expressions by @charliermarsh in https://github.com/charliermarsh/ruff/pull/1721--isolated CLI flag by @charliermarsh in https://github.com/charliermarsh/ruff/pull/1727RUFF_FORMAT environment variable support by @messense in https://github.com/charliermarsh/ruff/pull/1731assertNotContains by @harupy in https://github.com/charliermarsh/ruff/pull/1729Full Changelog: https://github.com/charliermarsh/ruff/compare/v0.0.214...v0.0.215
Use text in comment token by @harupy in https://github.com/charliermarsh/ruff/pull/1714
Full Changelog: https://github.com/charliermarsh/ruff/compare/v0.0.213...v0.0.214
Your coding agent can read these notes before it upgrades. Set up the MCP server →