NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI, #85 most downloaded on PyPI
An extremely fast Python linter and code formatter, written in Rust.
Latest stable
0.17.5
Last release 6 days ago
12 Nov 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
432 releases · first in 2022
Drag across the ruler to compare, or tap a release to open it.
<!-- Release notes generated using configuration in .github/release.yml at v0.0.286 -->
<!-- Release notes generated using configuration in .github/release.yml at v0.0.286 -->
flake8-bugbear] Update function-call-in-argument-default (B008) to ignore arguments with immutable annotations by @zanieb in https://github.com/astral-sh/ruff/pull/6784flake8-bugbear] Update mutable-argument-default (B006) to use extend-immutable-calls when determining if annotations are immutable by @zanieb in https://github.com/astral-sh/ruff/pull/6781flake8-pie] Implement unnecessary-range-start (PIE808) by @harupy in https://github.com/astral-sh/ruff/pull/6690flake8-pytest-style] Add autofix for PT014 by @harupy in https://github.com/astral-sh/ruff/pull/6698pylint] Implement no-self-use (R6301) by @LaBatata101 in https://github.com/astral-sh/ruff/pull/6574pylint] Extend repeated-equality-comparison-target to check for mixed orderings and Yoda conditions. by @tjkuson in https://github.com/astral-sh/ruff/pull/6691detect-same-package behavior configurable by @charliermarsh in https://github.com/astral-sh/ruff/pull/6833typing_extensions.TypeAlias for PYI026 fixes on pre-3.10 by @charliermarsh in https://github.com/astral-sh/ruff/pull/6696repeated-equality-comparison-target by @charliermarsh in https://github.com/astral-sh/ruff/pull/6705ctypes.WinError() in flake8-raise by @charliermarsh in https://github.com/astral-sh/ruff/pull/6731eq-without-hash when __hash__ is explicitly set to None by @LaBatata101 in https://github.com/astral-sh/ruff/pull/6739native-literals handling of int literal with attribute access by @zanieb in https://github.com/astral-sh/ruff/pull/6792uncessary-coding-comment fix when there's leading content by @zanieb in https://github.com/astral-sh/ruff/pull/6775C417 for lambda with default and variadic parameters by @dhruvmanila in https://github.com/astral-sh/ruff/pull/6752networkx to conventional aliases by @zanieb in https://github.com/astral-sh/ruff/pull/6778Full Changelog: https://github.com/astral-sh/ruff/compare/v0.0.285...v0.0.286
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Add deprecated unittest assertions to PT009 by @charliermarsh in https://github.com/astral-sh/ruff/pull/6572
flake8-pytest-style] Implement pytest-unittest-raises-assertion (PT027) by @harupy in https://github.com/astral-sh/ruff/pull/6554flake8-pytest-style] Implement pytest-duplicate-parametrize-test-cases (PT014) by @harupy in https://github.com/astral-sh/ruff/pull/6598flake8-tidy-imports] Implement banned-module-level-imports (TID253) by @durumu in https://github.com/astral-sh/ruff/pull/6378pylint] Implement bad-dunder-name (W3201) (in the Ruff nursery) by @LaBatata101 in https://github.com/astral-sh/ruff/pull/6486pylint] Implement subprocess-run-check (W1510) by @tjkuson in https://github.com/astral-sh/ruff/pull/6487ruff] Implement quadratic-list-summation (RUF017) by @evanrittenhouse in https://github.com/astral-sh/ruff/pull/6489flake8-bugbear] Add autofix for B006 by @qdegraaf in https://github.com/astral-sh/ruff/pull/6131flake8-pyi] Avoid applying PYI055 to runtime-evaluated annotations by @charliermarsh in https://github.com/astral-sh/ruff/pull/6457flake8-self] Allow os._exit accesses in SLF001 by @charliermarsh in https://github.com/astral-sh/ruff/pull/6490perflint] Ignore PERF203 if try contains loop control flow statements by @evanrittenhouse in https://github.com/astral-sh/ruff/pull/6536pylint] Check for invalid format type specifiers in nested replacements for PLE1300 by @zanieb in https://github.com/astral-sh/ruff/pull/6616tryceratops] Omit NotImplementedError from TRY003 by @charliermarsh in https://github.com/astral-sh/ruff/pull/6568.ipynb and .pyi sources when linting from stdin by @charliermarsh in https://github.com/astral-sh/ruff/pull/6628raises_require_match_for and raises_require_match_for by @harupy in https://github.com/astral-sh/ruff/pull/6635lambda-assignment fix always-manual in class bodies by @charliermarsh in https://github.com/astral-sh/ruff/pull/6626E721 by @charliermarsh in https://github.com/astral-sh/ruff/pull/6469E402 by @charliermarsh in https://github.com/astral-sh/ruff/pull/6526invalid-envvar-value by @charliermarsh in https://github.com/astral-sh/ruff/pull/6538locals() by @charliermarsh in https://github.com/astral-sh/ruff/pull/6578await in Jupyter notebooks by @charliermarsh in https://github.com/astral-sh/ruff/pull/6607pandas#values for stores, deletes, or class accesses by @charliermarsh in https://github.com/astral-sh/ruff/pull/6631E712 fix by @charliermarsh in https://github.com/astral-sh/ruff/pull/6575I002 by @durumu in https://github.com/astral-sh/ruff/pull/6523PLE1300 by @zanieb in https://github.com/astral-sh/ruff/pull/6616Full Changelog: https://github.com/astral-sh/ruff/compare/v0.0.284...v0.0.285
This release fixes a few bugs. Notably, the previous release announced a breaking change where the default target Python version changed from 3.10 to…
This release fixes a few bugs. Notably, the previous release announced a breaking change where the default target Python version changed from 3.10 to 3.8 but the change was not applied. Thanks to @rco-ableton for fixing this in https://github.com/astral-sh/ruff/pull/6444
S108 if path is inside tempfile.* call by @dhruvmanila in https://github.com/astral-sh/ruff/pull/6416Full Changelog: https://github.com/astral-sh/ruff/compare/v0.0.283...v0.0.284
<!-- Release notes generated using configuration in .github/release.yml at main -->
<!-- Release notes generated using configuration in .github/release.yml at main -->
flake8-pyi] PYI019: Detects if a type variable is used instead of Self in return annotations by @qdegraaf in https://github.com/astral-sh/ruff/pull/6204flake8-pyi] PYI051: Detects unions of Literal types by @LaBatata101 in https://github.com/astral-sh/ruff/pull/6215flake8-pyi] PYI055: Detects unions of types by @LaBatata101 in https://github.com/astral-sh/ruff/pull/6316pylint] E1300: Detects invalid string format characters by @silvanocerza in https://github.com/astral-sh/ruff/pull/6171pyupgrade] UP040: Upgrades type alias annotations to use PEP-695 syntax by @zanieb in https://github.com/astral-sh/ruff/pull/6289flake8-boolean-trap] FBT003: Add is_ and is_not to excluded functions by @zanieb in https://github.com/astral-sh/ruff/pull/6307flake8-logging-format] Allow capitalized names for logger candidate heuristic match by @charliermarsh in https://github.com/astral-sh/ruff/pull/6356flake8-pyi] Applicable rules are now checked non-stub code by @andersk in https://github.com/astral-sh/ruff/pull/6297
PYI013: ellipsis-in-non-empty-class-bodyPYI016: duplicate-union-memberPYI018: unused-private-type-varPYI019: custom-type-var-return-typePYI024: collections-named-tuplePYI025: unaliased-collections-abc-set-importPYI030: unnecessary-literal-unionPYI032: any-eq-ne-annotationPYI034: non-self-return-typePYI036: bad-exit-annotationPYI041: redundant-numeric-unionPYI042: snake-case-type-aliasPYI043: t-suffixed-type-aliasPYI045: iter-method-return-iterablePYI046: unused-private-protocolPYI047: unused-private-type-aliasPYI049: unused-private-typed-dictPYI050: no-return-argument-annotation-in-stub (Python ≥ 3.11)PYI051: redundant-literal-unionPYI056: unsupported-method-call-on-allflake8-pyi] PYI027 is being replaced by PYI022 / UP035 by @LaBatata101 in https://github.com/astral-sh/ruff/pull/6354pydocstyle] D103: Don't require docstrings in .pyi files by @charliermarsh in https://github.com/astral-sh/ruff/pull/6239pydocstyle] D203: Ignore same-line docstrings for lines-before and lines-after rules by @charliermarsh in https://github.com/astral-sh/ruff/pull/6344pylint] PLE0605: Allow generic tuple and list calls in __all__ by @charliermarsh in https://github.com/astral-sh/ruff/pull/6247pylint] PLR0124: Add detection of comparisons with built-in calls by @charliermarsh in https://github.com/astral-sh/ruff/pull/6324pyupgrade] UP032: Add support for await expressions in f-strings by @harupy in https://github.com/astral-sh/ruff/pull/6304pyupgrade] UP032: Add support for implicitly concatenated strings by @harupy in https://github.com/astral-sh/ruff/pull/6263pyupgrade] UP032: Add support for repeated format fields by @harupy in https://github.com/astral-sh/ruff/pull/6266ruff] RUF012: Permit ClassVar and Final without subscript by @bluetech in https://github.com/astral-sh/ruff/pull/6273flake8-bugbear] B006: Respect typing_extensions imports of Annotated by @PIG208 in https://github.com/astral-sh/ruff/pull/6361flake8-pyi] PYI019: Fix panic with positional-only arguments by @charliermarsh in https://github.com/astral-sh/ruff/pull/6350flake8-use-pathlib] Avoid raising PTH206 with maxsplit by @charliermarsh in https://github.com/astral-sh/ruff/pull/6283flake8] F841: Update autofix to not remove Jupyer magic expressions by @dhruvmanila in https://github.com/astral-sh/ruff/pull/6141pycodestyle] E721: Include comparisons to builtin types by @charliermarsh in https://github.com/astral-sh/ruff/pull/6325pycodestyle] E721: Match left-hand side types() call in types-comparison by @charliermarsh in https://github.com/astral-sh/ruff/pull/6326pyupgrade] UP031: Avoid auto-fixing if there are comments within the right-hand side by @harupy in https://github.com/astral-sh/ruff/pull/6364pyupgrade] UP032: Avoid auto-fixing if comments are present around format call arguments by @harupy in https://github.com/astral-sh/ruff/pull/6342pyupgrade] UP032: Improve invalid expression check by @harupy in https://github.com/astral-sh/ruff/pull/6308.format(...) calls with too-few-arguments by @charliermarsh in https://github.com/astral-sh/ruff/pull/6401.gitignore files in parent directories were incorrectly used by @charliermarsh in https://github.com/astral-sh/ruff/pull/6368Union expressions by @charliermarsh in https://github.com/astral-sh/ruff/pull/6399Full Changelog: https://github.com/astral-sh/ruff/compare/v0.0.282...v0.0.283
<!-- Release notes generated using configuration in .github/release.yml at v0.0.282 -->
<!-- Release notes generated using configuration in .github/release.yml at v0.0.282 -->
quoted-annotation rule (#5766)" by @charliermarsh in https://github.com/astral-sh/ruff/pull/6237Full Changelog: https://github.com/astral-sh/ruff/compare/v0.0.281...v0.0.282
<!-- Release notes generated using configuration in .github/release.yml at v0.0.281 -->
<!-- Release notes generated using configuration in .github/release.yml at v0.0.281 -->
See the release blog post for more, including detailed descriptions of any newly added rules.
flake8-pyi] Implement PYI018 by @LaBatata101 in https://github.com/astral-sh/ruff/pull/6018flake8-pyi] Implement PYI047 by @LaBatata101 in https://github.com/astral-sh/ruff/pull/6134flake8-pyi] Implement PYI049 by @LaBatata101 in https://github.com/astral-sh/ruff/pull/6136flake8-pyi] Implement PYI056 by @LaBatata101 in https://github.com/astral-sh/ruff/pull/5959flake8-pyi] Implement PYI046 by @LaBatata101 in https://github.com/astral-sh/ruff/pull/6098flake8-use-pathlib] Implement glob (PTH207) by @sbrugman in https://github.com/astral-sh/ruff/pull/5939flake8-use-pathlib] Implement os-sep-split (PTH206) by @sbrugman in https://github.com/astral-sh/ruff/pull/5936pycodestyle] Implement E241 and E242 (tab/multiple ws after commas) by @akx in https://github.com/astral-sh/ruff/pull/6094pylint] Implement self-assigning-variable (W0127) by @tjkuson in https://github.com/astral-sh/ruff/pull/6015pylint] Implement eq-without-hash rule (PLW1641) by @jelly in https://github.com/astral-sh/ruff/pull/5955pylint] Implement subprocess-popen-preexec-fn (W1509) by @tjkuson in https://github.com/astral-sh/ruff/pull/5978flake8-bugbear] Extends B002 to detect unary prefix decrement operators by @tjkuson in https://github.com/astral-sh/ruff/pull/5998flake8-pytest-style] Avoid raising PT012 for simple with statements by @harupy in https://github.com/astral-sh/ruff/pull/6081flake8-pytest-style] Allow pytest.raises body to contain a single func or class definition by @harupy in https://github.com/astral-sh/ruff/pull/6083flake8-simplify] Extend SIM118 with not in by @sbrugman in https://github.com/astral-sh/ruff/pull/5995perflint] Skip PERF203 violations for multi-statement loops by @charliermarsh in https://github.com/astral-sh/ruff/pull/6145pyupgrade] Add support for int, float, bool in UP018 by @dhruvmanila in https://github.com/astral-sh/ruff/pull/6013tryceratops] Add suggested fix for TRY201 by @dhruvmanila in https://github.com/astral-sh/ruff/pull/6008logging.Logger re-exports via logger-objects by @charliermarsh in https://github.com/astral-sh/ruff/pull/5750max-complexity to 10 for empty McCabe settings by @charliermarsh in https://github.com/astral-sh/ruff/pull/6073pep8-naming]: New config option extend-ignore-names by @dhruvmanila in https://github.com/astral-sh/ruff/pull/6169UP032 if format call arguments contain multiline expressions by @harupy in https://github.com/astral-sh/ruff/pull/5971F507 false positive by @harupy in https://github.com/astral-sh/ruff/pull/5986Literal members as expressions with __future__ by @charliermarsh in https://github.com/astral-sh/ruff/pull/6032x[:1]-like slices in RUF015 by @charliermarsh in https://github.com/astral-sh/ruff/pull/6150self accesses by @charliermarsh in https://github.com/astral-sh/ruff/pull/6165[ as an invalid noqa suffix by @charliermarsh in https://github.com/astral-sh/ruff/pull/5982explicit-string-concatenation on single line by @tjkuson in https://github.com/astral-sh/ruff/pull/6028SIM102 to handle indented elif by @harupy in https://github.com/astral-sh/ruff/pull/6072PTH201 for Path("") by @harupy in https://github.com/astral-sh/ruff/pull/6095SIM115 to cover pathlib.Path.open by @harupy in https://github.com/astral-sh/ruff/pull/611--diff for Jupyter Notebooks by @dhruvmanila in https://github.com/astral-sh/ruff/pull/6149SIM105 for non-exceptions by @sbrugman in https://github.com/astral-sh/ruff/pull/5985Full Changelog: https://github.com/astral-sh/ruff/compare/v0.0.280...v0.0.281
<!-- Release notes generated using configuration in .github/release.yml at v0.0.280 -->
<!-- Release notes generated using configuration in .github/release.yml at v0.0.280 -->
elif and else branches during import sorting by @charliermarsh in https://github.com/astral-sh/ruff/pull/5964Full Changelog: https://github.com/astral-sh/ruff/compare/v0.0.279...v0.0.280
<!-- Release notes generated using configuration in .github/release.yml at v0.0.279 -->
<!-- Release notes generated using configuration in .github/release.yml at v0.0.279 -->
flake8-pyi] Implement flake8-pyi's PYI026 by @LaBatata101 in https://github.com/astral-sh/ruff/pull/5844flake8-pyi] Implement flake8-pyi's PYI017 by @qdegraaf in https://github.com/astral-sh/ruff/pull/5895flake8-pyi] Implement flake8-pyi's PYI036 by @density in https://github.com/astral-sh/ruff/pull/5668flake8-pyi] Implement flake8-pyi's PYI041 by @density in https://github.com/astral-sh/ruff/pull/5722flake8-use-pathlib] Implement os-path-getsize and os-path-get(a|m|c)-time (PTH202-205) by @sbrugman in https://github.com/astral-sh/ruff/pull/5835flake8-use-pathlib] Implement path-constructor-default-argument (PTH201) by @sbrugman in https://github.com/astral-sh/ruff/pull/5833pandas-vet] Implement constant series rule (PD101) by @sbrugman in https://github.com/astral-sh/ruff/pull/5802pylint] Implement Pylint's consider-using-in (PLR1714) by @tjkuson in https://github.com/astral-sh/ruff/pull/5193flake8-annotations] Check for Any in other types for ANN401 by @dhruvmanila in https://github.com/astral-sh/ruff/pull/5601flake8-bugbear] Add autofix for B004 by @density in https://github.com/astral-sh/ruff/pull/5788flake8-bugbear] Remove B904's lowercase exemption by @charliermarsh in https://github.com/astral-sh/ruff/pull/5751flake8-use-pathlib] extend PTH118 with os.sep by @sbrugman in https://github.com/astral-sh/ruff/pull/5935pyupgrade] Expand scope of quoted-annotation rule (UP037) by @charliermarsh in https://github.com/astral-sh/ruff/pull/5766pyupgrade] Extend PEP 604 rewrites to support some quoted annotations by @charliermarsh in https://github.com/astral-sh/ruff/pull/5725ruff] Expand RUF015 to include all expression types by @charliermarsh in https://github.com/astral-sh/ruff/pull/5767Enum-and-str subclasses for slots enforcement by @charliermarsh in https://github.com/astral-sh/ruff/pull/5749sorted with differing arguments by @density in https://github.com/astral-sh/ruff/pull/5761incorrect-dict-iterator by @charliermarsh in https://github.com/astral-sh/ruff/pull/5763lint_only aware of the source kind by @dhruvmanila in https://github.com/astral-sh/ruff/pull/5876redefined-while-unused violations in classes by @charliermarsh in https://github.com/astral-sh/ruff/pull/5926--add-noqa by @dhruvmanila in https://github.com/astral-sh/ruff/pull/5727EXE001 and EXE002 on WSL by @tjkuson in https://github.com/astral-sh/ruff/pull/5735Expr::Call branches by @charliermarsh in https://github.com/astral-sh/ruff/pull/5772SetComp by @lkh42t in https://github.com/astral-sh/ruff/pull/5774runtime-import-in-type-checking-block (TCH004) behind enabled flag by @charliermarsh in https://github.com/astral-sh/ruff/pull/5789pandas-use-of-dot-read-table rule to emit only when read_table is used on CSV data by @tjkuson in https://github.com/astral-sh/ruff/pull/5807NamedTuple calls containing both a list of fields and keywords by @harupy in https://github.com/astral-sh/ruff/pull/5799noqa warnings by @sobolevn in https://github.com/astral-sh/ruff/pull/5856respect_gitignore when not in a git repo by @dhruvmanila in https://github.com/astral-sh/ruff/pull/5937Full Changelog: https://github.com/astral-sh/ruff/compare/v0.0.278...v0.0.279
<!-- Release notes generated using configuration in .github/release.yml at main -->
<!-- Release notes generated using configuration in .github/release.yml at main -->
See the release blog post for more, including detailed descriptions of any newly added rules.
pylint] Implement typevar-bivariance (PLC0131) by @tjkuson in https://github.com/astral-sh/ruff/pull/5517flake8-pyi] Implement unnecessary-literal-union (PYI030) by @zanieb in https://github.com/astral-sh/ruff/pull/5570pylint] Implement type-name-incorrect-variance (PLC0105) by @tjkuson in https://github.com/astral-sh/ruff/pull/5651ruff] Implement unnecessary-list-allocation-for-first-element (RUF015) by @evanrittenhouse in https://github.com/astral-sh/ruff/pull/5549flake8-bugbear] Implement re-sub-positional-args (B034) by @charliermarsh in https://github.com/astral-sh/ruff/pull/5669ruff] Implement invalid-index-type (RUF016) by @zanieb in https://github.com/astral-sh/ruff/pull/5602isort] Add --case-sensitive flag by @qdegraaf in https://github.com/astral-sh/ruff/pull/5539isort] Support globbing in isort options by @tjkuson in https://github.com/astral-sh/ruff/pull/5473str.format calls by @harupy in https://github.com/astral-sh/ruff/pull/5638unnecessary-map (C417) for late-bound lambdas by @charliermarsh in https://github.com/astral-sh/ruff/pull/5520.astimezone() by @dhruvmanila in https://github.com/astral-sh/ruff/pull/5524noqa directive parsing away from regex-based implementation by @charliermarsh in https://github.com/astral-sh/ruff/pull/5554# noqa directives by @charliermarsh in https://github.com/astral-sh/ruff/pull/5571# flake8: noqa directives by @charliermarsh in https://github.com/astral-sh/ruff/pull/5618tkinter import convention by @tjkuson in https://github.com/astral-sh/ruff/pull/5626PERF401 if conditional depends on list var by @dhruvmanila in https://github.com/astral-sh/ruff/pull/5603raise throws a caught exception by @evanrittenhouse in https://github.com/astral-sh/ruff/pull/5455Union declarations without | to PYI016 by @zanieb in https://github.com/astral-sh/ruff/pull/5598_name_ and _value_ accesses in flake8-self rules by @monosans in https://github.com/astral-sh/ruff/pull/5663repeated_keys() to use ComparableExpr by @qdegraaf in https://github.com/astral-sh/ruff/pull/5696Full Changelog: https://github.com/astral-sh/ruff/compare/v0.0.277...v0.0.278
<!-- Release notes generated using configuration in .github/release.yml at v0.0.277 -->
<!-- Release notes generated using configuration in .github/release.yml at v0.0.277 -->
pylint] Implement Pylint typevar-name-mismatch (C0132) by @tjkuson in https://github.com/astral-sh/ruff/pull/5501ruff rule --all subcommand (with JSON output) by @akx in https://github.com/astral-sh/ruff/pull/5059Full Changelog: https://github.com/astral-sh/ruff/compare/v0.0.276...v0.0.277
[numpy] Implement numpy-deprecated-function (NPY003) by @charliermarsh in https://github.com/astral-sh/ruff/pull/5468
<!-- Release notes generated using configuration in .github/release.yml at v0.0.276 -->
See the release blog post for more, including detailed descriptions of any newly added rules.
Highlights include: experimental support for linting Jupyter Notebooks.
To opt-in to linting Jupyter Notebook files, add the *.ipynb pattern to your include
setting, like so:
[tool.ruff]
# Allow Ruff to discover `*.ipynb` files.
include = ["*.py", "*.pyi", "**/pyproject.toml", "*.ipynb"]
This will prompt Ruff to discover Jupyter Notebook files in any specified directories, and lint them accordingly.
Jupyter Notebook support is currently opt-in and experimental. We'd love your help testing it out. Have feedback? Run into issues? Let us know!
flake8-pyi] Implement PYI002, PYI003, PYI004, PYI005 by @density in https://github.com/astral-sh/ruff/pull/5457numpy] Implement numpy-deprecated-function (NPY003) by @charliermarsh in https://github.com/astral-sh/ruff/pull/5468perflint] Implement unnecessary-list-cast (PERF101) by @qdegraaf in https://github.com/astral-sh/ruff/pull/5121perflint] Implement try-except-in-loop (PERF203) by @evanrittenhouse in https://github.com/astral-sh/ruff/pull/5166perflint] Implement manual-list-comprehension (PERF401) and manual-list-copy (PERF402) rules by @qdegraaf in https://github.com/astral-sh/ruff/pull/5298pylint] Implement Pylint single-string-used-for-slots (C0205) as single-string-slots (PLC0205) by @tjkuson in https://github.com/astral-sh/ruff/pull/5399--show-source) by @dhruvmanila in https://github.com/astral-sh/ruff/pull/5402--show-source) (#5402) by @dhruvmanila in https://github.com/astral-sh/ruff/pull/5414pyupgrade] Restore the keep-runtime-typing setting by @charliermarsh in https://github.com/astral-sh/ruff/pull/5470PythonVersion::Py312 by @charliermarsh in https://github.com/astral-sh/ruff/pull/5316pydantic.BaseSettings in mutable-class-default by @charliermarsh in https://github.com/astral-sh/ruff/pull/5312__slots__ assignments in mutable-class-default by @charliermarsh in https://github.com/astral-sh/ruff/pull/5314iteration-over-set by @charliermarsh in https://github.com/astral-sh/ruff/pull/5392unnecessary-encode-utf8 to fix encode on parenthesized strings correctly by @harupy in https://github.com/astral-sh/ruff/pull/5478Final assignments in stubs by @charliermarsh in https://github.com/astral-sh/ruff/pull/5490abc decorators when classifying function types by @charliermarsh in https://github.com/astral-sh/ruff/pull/5315@Author format for "Missing Author" rule in flake8-todos by @mayrholu in https://github.com/astral-sh/ruff/pull/4903invalid-escape-sequence rule by @charliermarsh in https://github.com/astral-sh/ruff/pull/5359flake8-django] Skip duplicate violations in DJ012 by @charliermarsh in https://github.com/astral-sh/ruff/pull/5469Full Changelog: https://github.com/astral-sh/ruff/compare/v0.0.275...v0.0.276
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
One column per quarter.