Update dependency ruff to v0.1.11 - autoclosed #83

Closed
renovate wants to merge 1 commit from renovate/ruff-0.x into master
Collaborator

This PR contains the following updates:

Package Update Change
ruff (source, changelog) minor ==0.0.278 -> ==0.1.11

Release Notes

astral-sh/ruff (ruff)

v0.1.11

Compare Source

Preview features
  • [pylint] Implement super-without-brackets (W0245) (#​9257)
Bug fixes
  • Check path string properly in python -m ruff invocations (#​9367)
Documentation
  • Tweak relative-imports message (#​9365)
  • Add fix safety note for yield-in-for-loop (#​9364)

v0.1.10

Compare Source

Preview features
  • Improve dummy_implementations preview style formatting (#​9240)
  • Normalise Hex and unicode escape sequences in strings (#​9280)
  • Parenthesize long type annotations in annotated assignments (#​9210)
  • Parenthesize multi-context managers in with statements (#​9222)
  • [flake8-pyi] Implement generator-return-from-iter-method (PYI058) (#​9313)
  • [pylint] Implement empty-comment (PLR2044) (#​9174)
  • [refurb] Implement bit-count (FURB161) (#​9265)
  • [ruff] Add never-union rule to detect redundant typing.NoReturn and typing.Never (#​9217)
CLI
  • Add paths to TOML parse errors (#​9358)
  • Add row and column numbers to formatter parse errors (#​9321)
  • Improve responsiveness when invoked via Python (#​9315)
  • Short rule messages should not end with a period (#​9345)
Configuration
  • Respect runtime-required decorators on functions (#​9317)
Bug fixes
  • Avoid asyncio-dangling-task for nonlocal and global bindings (#​9263)
  • Escape trailing placeholders in rule documentation (#​9301)
  • Fix continuation detection following multi-line strings (#​9332)
  • Fix scoping for generators in named expressions in classes (#​9248)
  • Port from obsolete wsl crate to is-wsl (#​9356)
  • Remove special pre-visit for module docstrings (#​9261)
  • Respect __str__ definitions from super classes (#​9338)
  • Respect unused-noqa via per-file-ignores (#​9300)
  • Respect attribute chains when resolving builtin call paths (#​9309)
  • Treat all typing_extensions members as typing aliases (#​9335)
  • Use Display for formatter parse errors (#​9316)
  • Wrap subscripted dicts in parens for f-string conversion (#​9238)
  • [flake8-annotations] Avoid adding return types to stub methods (#​9277)
  • [flake8-annotations] Respect mixed return and raise cases in return-type analysis (#​9310)
  • [flake8-bandit] Don't report violations when SafeLoader is imported from yaml.loader (S506) (#​9299)
  • [pylint] Avoid panic when comment is preceded by Unicode (#​9331)
  • [pylint] Change PLR0917 error message to match other PLR09XX messages (#​9308)
  • [refurb] Avoid false positives for math-constant (FURB152) (#​9290)
Documentation
  • Expand target name for better rule documentation (#​9302)
  • Fix typos found by codespell (#​9346)
  • [perflint] Document PERF102 fix un-safety (#​9351)
  • [pyupgrade] Document UP007 fix un-safety (#​9306)

v0.1.9

Compare Source

Breaking changes
  • Add site-packages to default exclusions (#​9188)
Preview features
  • Fix: Avoid parenthesizing subscript targets and values (#​9209)
  • [pylint] Implement too-many-locals (PLR0914) (#​9163)
  • Implement reimplemented_operator (FURB118) (#​9171)
  • Add a rule to detect string members in runtime-evaluated unions (#​9143)
  • Implement no_blank_line_before_class_docstring preview style (#​9154)
Rule changes
  • CONSTANT_CASE variables are improperly flagged for yoda violation (SIM300) (#​9164)
  • [flake8-pyi] Cover ParamSpecs and TypeVarTuples (PYI018) (#​9198)
  • [flake8-bugbear] Add fix for zip-without-explicit-strict (B905) (#​9176)
  • Add fix to automatically remove print and pprint statements (T201, T203) (#​9208)
  • Prefer Never to NoReturn in auto-typing in Python >= 3.11 (ANN201) (#​9213)
Formatter
  • can_omit_optional_parentheses: Exit early for unparenthesized expressions (#​9125)
  • Fix dynamic mode with doctests so that it doesn't exceed configured line width (#​9129)
  • Fix can_omit_optional_parentheses for expressions with a right most fstring (#​9124)
  • Add target_version to formatter options (#​9220)
CLI
  • Update ruff format --check to display message for already formatted files (#​9153)
Bug fixes
  • Reverse order of arguments for operator.contains (#​9192)
  • Iterate over lambdas in deferred type annotations (#​9175)
  • Fix panic in D208 with multibyte indent (#​9147)
  • Add support for NoReturn in auto-return-typing (#​9206)
  • Allow removal of typing from exempt-modules (#​9214)
  • Avoid mutable-class-default violations for Pydantic subclasses (#​9187)
  • Fix dropped union expressions for piped non-types in PYI055 autofix (#​9161)
  • Enable annotation quoting for multi-line expressions (#​9142)
  • Deduplicate edits when quoting annotations (#​9140)
  • Prevent invalid utf8 indexing in cell magic detection (#​9146)
  • Avoid nested quotations in auto-quoting fix (#​9168)
  • Add base-class inheritance detection to flake8-django rules (#​9151)
  • Avoid asyncio-dangling-task violations on shadowed bindings (#​9215)
Documentation
  • Fix blog post URL in changelog (#​9119)
  • Add error suppression hint for multi-line strings (#​9205)
  • Fix typo in SemanticModel.parent_expression docstring (#​9167)
  • Document link between import sorting and formatter (#​9117)

v0.1.8

Compare Source

This release includes opt-in support for formatting Python snippets within
docstrings via the docstring-code-format setting.
Check out the blog post for more details!

Preview features
  • Add "preserve" quote-style to mimic Black's skip-string-normalization (#​8822)
  • Implement prefer_splitting_right_hand_side_of_assignments preview style (#​8943)
  • [pycodestyle] Add fix for unexpected-spaces-around-keyword-parameter-equals (#​9072)
  • [pycodestyle] Add fix for comment-related whitespace rules (#​9075)
  • [pycodestyle] Allow sys.path modifications between imports (#​9047)
  • [refurb] Implement hashlib-digest-hex (FURB181) (#​9077)
Rule changes
  • Allow flake8-type-checking rules to automatically quote runtime-evaluated references (#​6001)
  • Allow transparent cell magics in Jupyter Notebooks (#​8911)
  • [flake8-annotations] Avoid ANN2xx fixes for abstract methods with empty bodies (#​9034)
  • [flake8-self] Ignore underscore references in type annotations (#​9036)
  • [pep8-naming] Allow class names when apps.get_model is a non-string (#​9065)
  • [pycodestyle] Allow matplotlib.use calls to intersperse imports (#​9094)
  • [pyflakes] Support fixing unused assignments in tuples by renaming variables (F841) (#​9107)
  • [pylint] Add fix for subprocess-run-without-check (PLW1510) (#​6708)
Formatter
  • Add docstring-code-format knob to enable docstring snippet formatting (#​8854)
  • Use double quotes for all docstrings, including single-quoted docstrings (#​9020)
  • Implement "dynamic" line width mode for docstring code formatting (#​9098)
  • Support reformatting Markdown code blocks (#​9030)
  • add support for formatting reStructuredText code snippets (#​9003)
  • Avoid trailing comma for single-argument with positional separator (#​9076)
  • Fix handling of trailing target comment (#​9051)
CLI
  • Hide unsafe fix suggestions when explicitly disabled (#​9095)
  • Add SARIF support to --output-format (#​9078)
Bug fixes
  • Apply unnecessary index rule prior to enumerate rewrite (#​9012)
  • [flake8-err-msg] Allow EM fixes even if msg variable is defined (#​9059)
  • [flake8-pie] Prevent keyword arguments duplication (#​8450)
  • [flake8-pie] Respect trailing comma in unnecessary-dict-kwargs (PIE804) (#​9015)
  • [flake8-raise] Avoid removing parentheses on ctypes.WinError (#​9027)
  • [isort] Avoid invalid combination of force-sort-within-types and lines-between-types (#​9041)
  • [isort] Ensure that from-style imports are always ordered first in __future__ (#​9039)
  • [pycodestyle] Allow tab indentation before keyword (#​9099)
  • [pylint] Ignore @overrides and @overloads for too-many-positional (#​9000)
  • [pyupgrade] Enable printf-string-formatting fix with comments on right-hand side (#​9037)
  • [refurb] Make math-constant (FURB152) rule more targeted (#​9054)
  • [refurb] Support floating-point base in redundant-log-base (FURB163) (#​9100)
  • [ruff] Detect unused-asyncio-dangling-task (RUF006) on unused assignments (#​9060)

v0.1.7

Compare Source

Preview features
  • Implement multiline dictionary and list hugging for preview style (#​8293)
  • Implement the fix_power_op_line_length preview style (#​8947)
  • Use Python version to determine typing rewrite safety (#​8919)
  • [flake8-annotations] Enable auto-return-type involving Optional and Union annotations (#​8885)
  • [flake8-bandit] Implement django-raw-sql (S611) (#​8651)
  • [flake8-bandit] Implement tarfile-unsafe-members (S202) (#​8829)
  • [flake8-pyi] Implement fix for unnecessary-literal-union (PYI030) (#​7934)
  • [flake8-simplify] Extend dict-get-with-none-default (SIM910) to non-literals (#​8762)
  • [pylint] - add unnecessary-list-index-lookup (PLR1736) + autofix (#​7999)
  • [pylint] - implement R0202 and R0203 with autofixes (#​8335)
  • [pylint] Implement repeated-keyword (PLe1132) (#​8706)
  • [pylint] Implement too-many-positional (PLR0917) (#​8995)
  • [pylint] Implement unnecessary-dict-index-lookup (PLR1733) (#​8036)
  • [refurb] Implement redundant-log-base (FURB163) (#​8842)
Rule changes
  • [flake8-boolean-trap] Allow booleans in @override methods (#​8882)
  • [flake8-bugbear] Avoid B015,B018 for last expression in a cell (#​8815)
  • [flake8-pie] Allow ellipses for enum values in stub files (#​8825)
  • [flake8-pyi] Check PEP 695 type aliases for snake-case-type-alias and t-suffixed-type-alias (#​8966)
  • [flake8-pyi] Check for kwarg and vararg NoReturn type annotations (#​8948)
  • [flake8-simplify] Omit select context managers from SIM117 (#​8801)
  • [pep8-naming] Allow Django model loads in non-lowercase-variable-in-function (N806) (#​8917)
  • [pycodestyle] Avoid E703 for last expression in a cell (#​8821)
  • [pycodestyle] Update E402 to work at cell level for notebooks (#​8872)
  • [pydocstyle] Avoid D100 for Jupyter Notebooks (#​8816)
  • [pylint] Implement fix for unspecified-encoding (PLW1514) (#​8928)
Formatter
  • Avoid unstable formatting in ellipsis-only body with trailing comment (#​8984)
  • Inline trailing comments for type alias similar to assignments (#​8941)
  • Insert trailing comma when function breaks with single argument (#​8921)
CLI
  • Update ruff check and ruff format to default to the current directory (#​8791)
  • Stop at the first resolved parent configuration (#​8864)
Configuration
  • [pylint] Default max-positional-args to max-args (#​8998)
  • [pylint] Add allow-dunder-method-names setting for bad-dunder-method-name (PLW3201) (#​8812)
  • [isort] Add support for from-first setting (#​8663)
  • [isort] Add support for length-sort settings (#​8841)
Bug fixes
  • Add support for @functools.singledispatch (#​8934)
  • Avoid off-by-one error in stripping noqa following multi-byte char (#​8979)
  • Avoid off-by-one error in with-item named expressions (#​8915)
  • Avoid syntax error via invalid ur string prefix (#​8971)
  • Avoid underflow in get_model matching (#​8965)
  • Avoid unnecessary index diagnostics when value is modified (#​8970)
  • Convert over-indentation rule to use number of characters (#​8983)
  • Detect implicit returns in auto-return-types (#​8952)
  • Fix start >= end error in over-indentation (#​8982)
  • Ignore @overload and @override methods for too-many-arguments checks (#​8954)
  • Lexer start of line is false only for Mode::Expression (#​8880)
  • Mark pydantic_settings.BaseSettings as having default copy semantics (#​8793)
  • Respect dictionary unpacking in NamedTuple assignments (#​8810)
  • Respect local subclasses in flake8-type-checking (#​8768)
  • Support type alias statements in simple statement positions (#​8916)
  • [flake8-annotations] Avoid filtering out un-representable types in return annotation (#​8881)
  • [flake8-pie] Retain extra ellipses in protocols and abstract methods (#​8769)
  • [flake8-pyi] Respect local enum subclasses in simple-defaults (PYI052) (#​8767)
  • [flake8-trio] Use correct range for TRIO115 fix (#​8933)
  • [flake8-trio] Use full arguments range for zero-sleep-call (#​8936)
  • [isort] fix: mark __main__ as first-party import (#​8805)
  • [pep8-naming] Avoid N806 errors for type alias statements (#​8785)
  • [perflint] Avoid PERF101 if there's an append in loop body (#​8809)
  • [pycodestyle] Allow space-before-colon after end-of-slice (#​8838)
  • [pydocstyle] Avoid non-character breaks in over-indentation (D208) (#​8866)
  • [pydocstyle] Ignore underlines when determining docstring logical lines (#​8929)
  • [pylint] Extend self-assigning-variable to multi-target assignments (#​8839)
  • [tryceratops] Avoid repeated triggers in nested tryceratops diagnostics (#​8772)
Documentation
  • Add advice for fixing RUF008 when mutability is not desired (#​8853)
  • Added the command to run ruff using pkgx to the installation.md (#​8955)
  • Document fix safety for flake8-comprehensions and some pyupgrade rules (#​8918)
  • Fix doc formatting for zero-sleep-call (#​8937)
  • Remove duplicate imports from os-stat documentation (#​8930)
  • Replace generated reference to MkDocs (#​8806)
  • Update Arch Linux package URL in installation.md (#​8802)
  • [flake8-pyi] Fix error in t-suffixed-type-alias (PYI043) example (#​8963)
  • [flake8-pyi] Improve motivation for custom-type-var-return-type (PYI019) (#​8766)

v0.1.6

Compare Source

Preview features
  • [flake8-boolean-trap] Extend boolean-type-hint-positional-argument (FBT001) to include booleans in unions (#​7501)
  • [flake8-pie] Extend reimplemented-list-builtin (PIE807) to dict reimplementations (#​8608)
  • [flake8-pie] Extend unnecessary-pass (PIE790) to include ellipses (...) (#​8641)
  • [flake8-pie] Implement fix for unnecessary-spread (PIE800) (#​8668)
  • [flake8-quotes] Implement unnecessary-escaped-quote (Q004) (#​8630)
  • [pycodestyle] Implement fix for multiple-spaces-after-keyword (E271) and multiple-spaces-before-keyword (E272) (#​8622)
  • [pycodestyle] Implement fix for multiple-spaces-after-operator (E222) and multiple-spaces-before-operator (E221) (#​8623)
  • [pyflakes] Extend is-literal (F632) to include comparisons against mutable initializers (#​8607)
  • [pylint] Implement redefined-argument-from-local (PLR1704) (#​8159)
  • [pylint] Implement fix for unnecessary-lambda (PLW0108) (#​8621)
  • [refurb] Implement if-expr-min-max (FURB136) (#​8664)
  • [refurb] Implement math-constant (FURB152) (#​8727)
Rule changes
  • [flake8-annotations] Add autotyping-like return type inference for annotation rules (#​8643)
  • [flake8-future-annotations] Implement fix for future-required-type-annotation (FA102) (#​8711)
  • [flake8-implicit-namespace-package] Avoid missing namespace violations in scripts with shebangs (#​8710)
  • [pydocstyle] Update over-indentation (D208) to preserve indentation offsets when fixing overindented lines (#​8699)
  • [pyupgrade] Refine timeout-error-alias (UP041) to remove false positives (#​8587)
Formatter
  • Fix instability in await formatting with fluent style (#​8676)
  • Compare formatted and unformatted ASTs during formatter tests (#​8624)
  • Preserve trailing semicolon for Notebooks (#​8590)
CLI
  • Improve debug printing for resolving origin of config settings (#​8729)
  • Write unchanged, excluded files to stdout when read via stdin (#​8596)
Configuration
  • [isort] Support disabling sections with no-sections = true (#​8657)
  • [pep8-naming] Support local and dynamic class- and static-method decorators (#​8592)
  • [pydocstyle] Allow overriding pydocstyle convention rules (#​8586)
Bug fixes
  • Avoid syntax error via importing trio.lowlevel (#​8730)
  • Omit unrolled augmented assignments in PIE794 (#​8634)
  • Slice source code instead of generating it for EM fixes (#​7746)
  • Allow whitespace around colon in slices for whitespace-before-punctuation (E203) (#​8654)
  • Use function range for no-self-use (#​8637)
  • F-strings doesn't contain bytes literal for PLW0129 (#​8675)
  • Improve detection of TYPE_CHECKING blocks imported from typing_extensions or _typeshed (#​8429)
  • Treat display as a builtin in IPython (#​8707)
  • Avoid FURB113 autofix if comments are present (#​8494)
  • Consider the new f-string tokens for flake8-commas (#​8582)
  • Remove erroneous bad-dunder-name reference (#​8742)
  • Avoid recommending Self usages in metaclasses (#​8639)
  • Detect runtime-evaluated base classes defined in the current file (#​8572)
  • Avoid inserting trailing commas within f-strings (#​8574)
  • Remove incorrect deprecation label for stdout and stderr (#​8743)
  • Fix unnecessary parentheses in UP007 fix (#​8610)
  • Remove repeated and erroneous scoped settings headers in docs (#​8670)
  • Trim trailing empty strings when converting to f-strings (#​8712)
  • Fix ordering for force-sort-within-sections (#​8665)
  • Run unicode prefix rule over tokens (#​8709)
  • Update UP032 to unescape curly braces in literal parts of converted strings (#​8697)
  • List all ipython builtins (#​8719)
Documentation
  • Document conventions in the FAQ (#​8638)
  • Redirect from rule codes to rule pages in docs (#​8636)
  • Fix permalink to convention setting (#​8575)

v0.1.5

Compare Source

Preview features
  • [flake8-bandit] Implement mako-templates (S702) (#​8533)
  • [flake8-trio] Implement TRIO105 (#​8490)
  • [flake8-trio] Implement TRIO109 (#​8534)
  • [flake8-trio] Implement TRIO110 (#​8537)
  • [flake8-trio] Implement TRIO115 (#​8486)
  • [refurb] Implement type-none-comparison (FURB169) (#​8487)
  • Flag all comparisons against builtin types in E721 (#​8491)
  • Make SIM118 fix as safe when the expression is a known dictionary (#​8525)
Formatter
  • Fix multiline lambda expression statement formatting (#​8466)
CLI
  • Add hidden --extension to override inference of source type from file extension (#​8373)
Configuration
  • Account for selector specificity when merging extend_unsafe_fixes and override extend_safe_fixes (#​8444)
  • Add support for disabling cache with RUFF_NO_CACHE environment variable (#​8538)
Bug fixes
  • [E721] Flag comparisons to memoryview (#​8485)
  • Allow collapsed-ellipsis bodies in other statements (#​8499)
  • Avoid D301 autofix for u prefixed strings (#​8495)
  • Only flag flake8-trio rules when trio import is present (#​8550)
  • Reject more syntactically invalid Python programs (#​8524)
  • Avoid raising TRIO115 violations for trio.sleep(...) calls with non-number values (#​8532)
  • Fix F841 false negative on assignment to multiple variables (#​8489)
Documentation
  • Fix link to isort known-first-party (#​8562)
  • Add notes on fix safety to a few rules (#​8500)
  • Add missing toml config tabs (#​8512)
  • Add instructions for configuration of Emacs (#​8488)
  • Improve detail link contrast in dark mode (#​8548)
  • Fix typo in example (#​8506)
  • Added tabs for configuration files in the documentation (#​8480)
  • Recommend project.requires-python over target-version (#​8513)
  • Add singleton escape hatch to B008 documentation (#​8501)
  • Fix tab configuration docs (#​8502)

v0.1.4

Compare Source

Preview features
  • [flake8-trio] Implement timeout-without-await (TRIO001) (#​8439)
  • [numpy] Implement NumPy 2.0 migration rule (NPY200) (#​7702)
  • [pylint] Implement bad-open-mode (W1501) (#​8294)
  • [pylint] Implement import-outside-toplevel (C0415) rule (#​5180)
  • [pylint] Implement useless-with-lock (W2101) (#​8321)
  • [pyupgrade] Implement timeout-error-alias (UP041) (#​8476)
  • [refurb] Implement isinstance-type-none (FURB168) (#​8308)
  • Detect confusable Unicode-to-Unicode units in RUF001, RUF002, and RUF003 (#​4430)
  • Add newline after module docstrings in preview style (#​8283)
Formatter
  • Add a note on line-too-long to the formatter docs (#​8314)
  • Preserve trailing statement semicolons when using fmt: skip (#​8273)
  • Preserve trailing semicolons when using fmt: off (#​8275)
  • Avoid duplicating linter-formatter compatibility warnings (#​8292)
  • Avoid inserting a newline after function docstrings (#​8375)
  • Insert newline between docstring and following own line comment (#​8216)
  • Split tuples in return positions by comma first (#​8280)
  • Avoid treating byte strings as docstrings (#​8350)
  • Add --line-length option to format command (#​8363)
  • Avoid parenthesizing unsplittable because of comments (#​8431)
CLI
  • Add --output-format to ruff rule and ruff linter (#​8203)
Bug fixes
  • Respect --force-exclude in lint.exclude and format.exclude (#​8393)
  • Respect --extend-per-file-ignores on the CLI (#​8329)
  • Extend bad-dunder-method-name to permit __index__ (#​8300)
  • Fix panic with 8 in octal escape (#​8356)
  • Avoid raising D300 when both triple quote styles are present (#​8462)
  • Consider unterminated f-strings in FStringRanges (#​8154)
  • Avoid including literal shell=True for truthy, non-True diagnostics (#​8359)
  • Avoid triggering single-element test for starred expressions (#​8433)
  • Detect and ignore Jupyter automagics (#​8398)
  • Fix invalid E231 error with f-strings (#​8369)
  • Avoid triggering NamedTuple rewrite with starred annotation (#​8434)
  • Avoid un-setting bracket flag in logical lines (#​8380)
  • Place 'r' prefix before 'f' for raw format strings (#​8464)
  • Remove trailing periods from NumPy 2.0 code actions (#​8475)
  • Fix bug where PLE1307 was raised when formatting %c with characters (#​8407)
  • Remove unicode flag from comparable (#​8440)
  • Improve B015 message (#​8295)
  • Use fixedOverflowWidgets for playground popover (#​8458)
  • Mark byte_bounds as a non-backwards-compatible NumPy 2.0 change (#​8474)
Internals
  • Add a dedicated cache directory per Ruff version (#​8333)
  • Allow selective caching for --fix and --diff (#​8316)
  • Improve performance of comment parsing (#​8193)
  • Improve performance of string parsing (#​8227)
  • Use a dedicated sort key for isort import sorting (#​7963)

v0.1.3

Compare Source

This release includes a variety of improvements to the Ruff formatter, removing several known and
unintentional deviations from Black.

Formatter
  • Avoid space around pow for None, True and False (#​8189)
  • Avoid sorting all paths in the format command (#​8181)
  • Insert necessary blank line between class and leading comments (#​8224)
  • Avoid introducing new parentheses in annotated assignments (#​8233)
  • Refine the warnings about incompatible linter options (#​8196)
  • Add test and basic implementation for formatter preview mode (#​8044)
  • Refine warning about incompatible isort settings (#​8192)
  • Only omit optional parentheses for starting or ending with parentheses (#​8238)
  • Use source type to determine parser mode for formatting (#​8205)
  • Don't warn about magic trailing comma when isort.force-single-line is true (#​8244)
  • Use SourceKind::diff for formatter (#​8240)
  • Fix fmt:off with trailing child comment (#​8234)
  • Formatter parentheses support for IpyEscapeCommand (#​8207)
Linter
  • [pylint] Add buffer methods to bad-dunder-method-name (PLW3201) exclusions (#​8190)
  • Match rule prefixes from external codes setting in unused-noqa (#​8177)
  • Use line-length setting for isort in lieu of pycodestyle.max-line-length (#​8235)
  • Update fix for unnecessary-paren-on-raise-exception to unsafe for unknown types (#​8231)
  • Correct quick fix message for W605 (#​8255)
Documentation
  • Fix typo in max-doc-length documentation (#​8201)
  • Improve documentation around linter-formatter conflicts (#​8257)
  • Fix link to error suppression documentation in unused-noqa (#​8172)
  • Add external option to unused-noqa documentation (#​8171)
  • Add title attribute to icons (#​8060)
  • Clarify unsafe case in RSE102 (#​8256)
  • Fix skipping formatting examples (#​8210)
  • docs: fix name of magic-trailing-comma option in README (#​8200)
  • Add note about scope of rule changing in versioning policy (#​8169)
  • Document: Fix default lint rules (#​8218)
  • Fix a wrong setting in configuration.md (#​8186)
  • Fix misspelled TOML headers in the tutorial (#​8209)

v0.1.2

Compare Source

This release includes the Beta version of the Ruff formatter — an extremely fast, Black-compatible Python formatter.
Try it today with ruff format! Check out the blog post and read the docs.

Preview features
  • [pylint] Implement non-ascii-module-import (C2403) (#​8056)
  • [pylint] implement non-ascii-name (C2401) (#​8038)
  • [pylint] Implement unnecessary-lambda (W0108) (#​7953)
  • [refurb] Implement read-whole-file (FURB101) (#​7682)
  • Add fix for E223, E224, and E242 (#​8143)
  • Add fix for E225, E226, E227, and E228 (#​8136)
  • Add fix for E252 (#​8142)
  • Add fix for E261 (#​8114)
  • Add fix for E273 and E274 (#​8144)
  • Add fix for E275 (#​8133)
  • Update SIM401 to catch ternary operations (#​7415)
  • Update E721 to allow is and is not for direct type comparisons (#​7905)
Rule changes
  • Add backports.strenum to deprecated-imports (#​8113)
  • Update SIM112 to ignore https_proxy, http_proxy, and no_proxy (#​8140)
  • Update fix for literal-membership (PLR6201) to be unsafe (#​8097)
  • Update fix for mutable-argument-defaults (B006) to be unsafe (#​8108)
Formatter
  • Change line-ending default to auto (#​8057)
  • Respect parenthesized generators in has_own_parentheses (#​8100)
  • Add caching to formatter (#​8089)
  • Remove --line-length option from format command (#​8131)
  • Add formatter to line-length documentation (#​8150)
  • Warn about incompatible formatter options (#​8088)
  • Fix range of unparenthesized tuple subject in match statement (#​8101)
  • Remove experimental formatter warning (#​8148)
  • Don't move type param opening parenthesis comment (#​8163)
  • Update versions in format benchmark script (#​8110)
  • Avoid loading files for cached format results (#​8134)
CLI
  • Show the ruff format command in help menus (#​8167)
  • Add ruff version command with long version display (#​8034)
Configuration
  • New pycodestyle.max-line-length option (#​8039)
Bug fixes
  • Detect sys.version_info slices in outdated-version-block (#​8112)
  • Avoid if-else simplification for TYPE_CHECKING blocks (#​8072)
  • Avoid false-positive print separator diagnostic with starred argument (#​8079)
Documentation
  • Fix message for too-many-arguments lint (#​8092)
  • Fix extend-unsafe-fixes and extend-safe-fixes example (#​8139)
  • Add links to flake8-import-conventions options (#​8115)
  • Rework the documentation to incorporate the Ruff formatter (#​7732)
  • Fix Options JSON schema description (#​8081)
  • Fix typo (pytext -> pytest) (#​8117)
  • Improve magic-value-comparison example in docs (#​8111)

v0.1.1

Compare Source

Preview features
  • Improve dummy_implementations preview style formatting (#​9240)
  • Normalise Hex and unicode escape sequences in strings (#​9280)
  • Parenthesize long type annotations in annotated assignments (#​9210)
  • Parenthesize multi-context managers in with statements (#​9222)
  • [flake8-pyi] Implement generator-return-from-iter-method (PYI058) (#​9313)
  • [pylint] Implement empty-comment (PLR2044) (#​9174)
  • [refurb] Implement bit-count (FURB161) (#​9265)
  • [ruff] Add never-union rule to detect redundant typing.NoReturn and typing.Never (#​9217)
CLI
  • Add paths to TOML parse errors (#​9358)
  • Add row and column numbers to formatter parse errors (#​9321)
  • Improve responsiveness when invoked via Python (#​9315)
  • Short rule messages should not end with a period (#​9345)
Configuration
  • Respect runtime-required decorators on functions (#​9317)
Bug fixes
  • Avoid asyncio-dangling-task for nonlocal and global bindings (#​9263)
  • Escape trailing placeholders in rule documentation (#​9301)
  • Fix continuation detection following multi-line strings (#​9332)
  • Fix scoping for generators in named expressions in classes (#​9248)
  • Port from obsolete wsl crate to is-wsl (#​9356)
  • Remove special pre-visit for module docstrings (#​9261)
  • Respect __str__ definitions from super classes (#​9338)
  • Respect unused-noqa via per-file-ignores (#​9300)
  • Respect attribute chains when resolving builtin call paths (#​9309)
  • Treat all typing_extensions members as typing aliases (#​9335)
  • Use Display for formatter parse errors (#​9316)
  • Wrap subscripted dicts in parens for f-string conversion (#​9238)
  • [flake8-annotations] Avoid adding return types to stub methods (#​9277)
  • [flake8-annotations] Respect mixed return and raise cases in return-type analysis (#​9310)
  • [flake8-bandit] Don't report violations when SafeLoader is imported from yaml.loader (S506) (#​9299)
  • [pylint] Avoid panic when comment is preceded by Unicode (#​9331)
  • [pylint] Change PLR0917 error message to match other PLR09XX messages (#​9308)
  • [refurb] Avoid false positives for math-constant (FURB152) (#​9290)
Documentation
  • Expand target name for better rule documentation (#​9302)
  • Fix typos found by codespell (#​9346)
  • [perflint] Document PERF102 fix un-safety (#​9351)
  • [pyupgrade] Document UP007 fix un-safety (#​9306)

v0.1.0

Compare Source

This is the first release which uses the CHANGELOG file. See GitHub Releases for prior changelog entries.

Read Ruff's new versioning policy.

Breaking changes
  • Unsafe fixes are no longer displayed or applied without opt-in (#​7769)
  • Drop formatting specific rules from the default set (#​7900)
  • The deprecated format setting has been removed (#​7984)
    • The format setting cannot be used to configure the output format, use output-format instead
    • The RUFF_FORMAT environment variable is ignored, use RUFF_OUTPUT_FORMAT instead
    • The --format option has been removed from ruff check, use --output-format instead
Rule changes
  • Extend reimplemented-starmap (FURB140) to catch calls with a single and starred argument (#​7768)
  • Improve cases covered by RUF015 (#​7848)
  • Update SIM15 to allow open followed by close (#​7916)
  • Respect msgspec.Struct default-copy semantics in RUF012 (#​7786)
  • Add sqlalchemy methods to `flake8-boolean-trap`` exclusion list (#​7874)
  • Add fix for PLR1714 (#​7910)
  • Add fix for PIE804 (#​7884)
  • Add fix for PLC0208 (#​7887)
  • Add fix for PYI055 (#​7886)
  • Update non-pep695-type-alias to require --unsafe-fixes outside of stub files (#​7836)
  • Improve fix message for UP018 (#​7913)
  • Update PLW3201 to support Enum sunder names (#​7987)
Preview features
  • Only show warnings for empty preview selectors when enabling rules (#​7842)
  • Add unnecessary-key-check to simplify key in dct and dct[key] to dct.get(key) (#​7895)
  • Add assignment-in-assert to prevent walrus expressions in assert statements (#​7856)
  • [refurb] Add single-item-membership-test (FURB171) (#​7815)
  • [pylint] Add and-or-ternary (R1706) (#​7811)

New rules are added in preview.

Configuration
  • Add unsafe-fixes setting (#​7769)
  • Add extend-safe-fixes and extend-unsafe-fixes for promoting and demoting fixes (#​7841)
CLI
  • Added --unsafe-fixes option for opt-in to display and apply unsafe fixes (#​7769)
  • Fix use of deprecated --format option in warning (#​7837)
  • Show changed files when running under --check (#​7788)
  • Write summary messages to stderr when fixing via stdin instead of omitting them (#​7838)
  • Update fix summary message in check --diff to include unsafe fix hints (#​7790)
  • Add notebook cell field to JSON output format (#​7664)
  • Rename applicability levels to Safe, Unsafe, and Display (#​7843)
Bug fixes
  • Fix bug where f-strings were allowed in match pattern literal (#​7857)
  • Fix SIM110 with a yield in the condition (#​7801)
  • Preserve trailing comments in C414 fixes (#​7775)
  • Check sequence type before triggering unnecessary-enumerate len suggestion (#​7781)
  • Use correct start location for class/function clause header (#​7802)
  • Fix incorrect fixes for SIM101 (#​7798)
  • Format comment before parameter default correctly (#​7870)
  • Fix E251 false positive inside f-strings (#​7894)
  • Allow bindings to be created and referenced within annotations (#​7885)
  • Show per-cell diffs when analyzing notebooks over stdin (#​7789)
  • Avoid curly brace escape in f-string format spec (#​7780)
  • Fix lexing single-quoted f-string with multi-line format spec (#​7787)
  • Consider nursery rules to be in-preview for ruff rule (#​7812)
  • Report precise location for invalid conversion flag (#​7809)
  • Visit pattern match guard as a boolean test (#​7911)
  • Respect --unfixable in ISC rules (#​7917)
  • Fix edge case with PIE804 (#​7922)
  • Show custom message in PTH118 for Path.joinpath with starred arguments (#​7852)
  • Fix false negative in outdated-version-block when using greater than comparisons (#​7920)
  • Avoid converting f-strings within Django gettext calls (#​7898)
  • Fix false positive in PLR6301 (#​7933)
  • Treat type aliases as typing-only expressions e.g. resolves false positive in TCH004 (#​7968)
  • Resolve cache-dir relative to project root (#​7962)
  • Respect subscripted base classes in type-checking rules e.g. resolves false positive in TCH003 (#​7954)
  • Fix JSON schema limit for line-length (#​7883)
  • Fix commented-out coalesce keyword (#​7876)
Documentation
  • Document reimplemented-starmap performance effects (#​7846)
  • Default to following the system dark/light mode (#​7888)
  • Add documentation for fixes (#​7901)
  • Fix typo in docs of PLR6301 (#​7831)
  • Update UP038 docs to note that it results in slower code (#​7872)
  • crlf -> cr-lf (#​7766)
  • Add an example of an unsafe fix (#​7924)
  • Fix documented examples for unnecessary-subscript-reversal (#​7774)
  • Correct error in tuple example in ruff formatter docs (#​7822)
  • Add versioning policy to documentation (#​7923)
  • Fix invalid code in FURB177 example (#​7832)
Formatter
  • Less scary ruff format message (#​7867)
  • Remove spaces from import statements (#​7859)
  • Formatter quoting for f-strings with triple quotes (#​7826)
  • Update ruff_python_formatter generate.py comment (#​7850)
  • Document one-call chaining deviation (#​7767)
  • Allow f-string modifications in line-shrinking cases (#​7818)
  • Add trailing comment deviation to README (#​7827)
  • Add trailing zero between dot and exponential (#​7956)
  • Force parentheses for power operations in unary expressions (#​7955)
Playground
  • Fix playground Quick Fix action (#​7824)

v0.0.292

Compare Source

What's Changed

Highlights

This release includes full support for Python 3.12 (out now!), including the new type parameter (PEP 695) and f-string syntaxes (PEP 701).

PEP 701 lifts many of the restrictions on f-strings that existed in the past, allowing for arbitrarily nested f-strings, consistent quote style within f-strings, and more, all of which are now supported by Ruff (thanks to @​dhruvmanila in https://github.com/astral-sh/ruff/pull/7376).

Breaking Changes
  • In the formatter, format.quote-style no longer affects triple-quoted strings, to align with common conventions as well as the guidance from PEP 8 and PEP 257 (see: https://github.com/astral-sh/ruff/pull/7680).
  • line-too-long (E501) now ignores trailing pragma comments (like # type: ignore and # noqa) when computing line length (see: https://github.com/astral-sh/ruff/pull/7692). This is similar to flake8-bugbear's methodology for detecting overlong lines, and ensures that adding pragmas like # noqa does not introduce further lint errors.
Rules
Settings
Bug Fixes
Other Changes

New Contributors

Full Changelog: https://github.com/astral-sh/ruff/compare/v0.0.291...v0.0.292

v0.0.291

Compare Source

What's Changed

Deprecations

The format command-line argument and configuration option has been renamed to output-format. While Ruff will continue to respect format when passed as a command-line argument or configuration option, this backwards-compatible support will be dropped in a future release. See: https://github.com/astral-sh/ruff/pull/7514.

Rules
Settings
Bug Fixes

New Contributors

Full Changelog: https://github.com/astral-sh/ruff/compare/v0.0.290...v0.0.291

v0.0.290

Compare Source

What's Changed

Rules
Settings
Bug Fixes
Preview

What's this section?

New Contributors

Full Changelog: https://github.com/astral-sh/ruff/compare/v0.0.289...v0.0.290

v0.0.289

Compare Source

What's Changed

Bug Fixes
Preview

This release includes a new preview mode which can be used to opt-in to unstable rules and features.

See the documentation and versioning discussion for more details.

New Contributors

Full Changelog: https://github.com/astral-sh/ruff/compare/v0.0.288...v0.0.289

v0.0.288

Compare Source

What's Changed

Breaking Changes
Rules
Settings
Bug Fixes
Other Changes

New Contributors

Full Changelog: https://github.com/astral-sh/ruff/compare/v0.0.287...v0.0.288

v0.0.287

Compare Source

What's Changed

Rules
Bug Fixes

New Contributors

Full Changelog: https://github.com/astral-sh/ruff/compare/v0.0.286...v0.0.287

v0.0.286

Compare Source

What's Changed

New Rules
Settings
Bug Fixes

Full Changelog: https://github.com/astral-sh/ruff/compare/v0.0.285...v0.0.286

v0.0.285

Compare Source

What's Changed

New rules
Rule changes
Settings
Bug Fixes
Playground
Performance

New Contributors

Full Changelog: https://github.com/astral-sh/ruff/compare/v0.0.284...v0.0.285

v0.0.284

Compare Source

What's Changed

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

Bug Fixes

New Contributors

Full Changelog: https://github.com/astral-sh/ruff/compare/v0.0.283...v0.0.284

v0.0.283

Compare Source

What's Changed

Breaking Changes
Rules
Rule Changes
Bug Fixes
Playground
Other Changes

New Contributors

Full Changelog: https://github.com/astral-sh/ruff/compare/v0.0.282...v0.0.283

v0.0.282

Compare Source

What's Changed

Bug Fixes

New Contributors

Full Changelog: https://github.com/astral-sh/ruff/compare/v0.0.281...v0.0.282

v0.0.281

Compare Source

What's Changed

See the release blog post for more, including detailed descriptions of any newly added rules.

New rules
Rule changes
Settings
Bug Fixes

New Contributors

Full Changelog: https://github.com/astral-sh/ruff/compare/v0.0.280...v0.0.281

v0.0.280

Compare Source

What's Changed

Bug Fixes

Full Changelog: https://github.com/astral-sh/ruff/compare/v0.0.279...v0.0.280

v0.0.279

Compare Source

What's Changed

Rules
Rule changes
Bug Fixes

New Contributors

Full Changelog: https://github.com/astral-sh/ruff/compare/v0.0.278...v0.0.279


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

This PR contains the following updates: | Package | Update | Change | |---|---|---| | [ruff](https://docs.astral.sh/ruff) ([source](https://github.com/astral-sh/ruff), [changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)) | minor | `==0.0.278` -> `==0.1.11` | --- ### Release Notes <details> <summary>astral-sh/ruff (ruff)</summary> ### [`v0.1.11`](https://github.com/astral-sh/ruff/blob/HEAD/CHANGELOG.md#0111) [Compare Source](https://github.com/astral-sh/ruff/compare/v0.1.10...v0.1.11) ##### Preview features - \[`pylint`] Implement `super-without-brackets` (`W0245`) ([#&#8203;9257](https://github.com/astral-sh/ruff/pull/9257)) ##### Bug fixes - Check path string properly in `python -m ruff` invocations ([#&#8203;9367](https://github.com/astral-sh/ruff/pull/9367)) ##### Documentation - Tweak `relative-imports` message ([#&#8203;9365](https://github.com/astral-sh/ruff/pull/9365)) - Add fix safety note for `yield-in-for-loop` ([#&#8203;9364](https://github.com/astral-sh/ruff/pull/9364)) ### [`v0.1.10`](https://github.com/astral-sh/ruff/blob/HEAD/CHANGELOG.md#0110) [Compare Source](https://github.com/astral-sh/ruff/compare/v0.1.9...v0.1.10) ##### Preview features - Improve `dummy_implementations` preview style formatting ([#&#8203;9240](https://github.com/astral-sh/ruff/pull/9240)) - Normalise Hex and unicode escape sequences in strings ([#&#8203;9280](https://github.com/astral-sh/ruff/pull/9280)) - Parenthesize long type annotations in annotated assignments ([#&#8203;9210](https://github.com/astral-sh/ruff/pull/9210)) - Parenthesize multi-context managers in `with` statements ([#&#8203;9222](https://github.com/astral-sh/ruff/pull/9222)) - \[`flake8-pyi`] Implement `generator-return-from-iter-method` (`PYI058`) ([#&#8203;9313](https://github.com/astral-sh/ruff/pull/9313)) - \[`pylint`] Implement `empty-comment` (`PLR2044`) ([#&#8203;9174](https://github.com/astral-sh/ruff/pull/9174)) - \[`refurb`] Implement `bit-count` (`FURB161`) ([#&#8203;9265](https://github.com/astral-sh/ruff/pull/9265)) - \[`ruff`] Add `never-union` rule to detect redundant `typing.NoReturn` and `typing.Never` ([#&#8203;9217](https://github.com/astral-sh/ruff/pull/9217)) ##### CLI - Add paths to TOML parse errors ([#&#8203;9358](https://github.com/astral-sh/ruff/pull/9358)) - Add row and column numbers to formatter parse errors ([#&#8203;9321](https://github.com/astral-sh/ruff/pull/9321)) - Improve responsiveness when invoked via Python ([#&#8203;9315](https://github.com/astral-sh/ruff/pull/9315)) - Short rule messages should not end with a period ([#&#8203;9345](https://github.com/astral-sh/ruff/pull/9345)) ##### Configuration - Respect runtime-required decorators on functions ([#&#8203;9317](https://github.com/astral-sh/ruff/pull/9317)) ##### Bug fixes - Avoid `asyncio-dangling-task` for nonlocal and global bindings ([#&#8203;9263](https://github.com/astral-sh/ruff/pull/9263)) - Escape trailing placeholders in rule documentation ([#&#8203;9301](https://github.com/astral-sh/ruff/pull/9301)) - Fix continuation detection following multi-line strings ([#&#8203;9332](https://github.com/astral-sh/ruff/pull/9332)) - Fix scoping for generators in named expressions in classes ([#&#8203;9248](https://github.com/astral-sh/ruff/pull/9248)) - Port from obsolete wsl crate to is-wsl ([#&#8203;9356](https://github.com/astral-sh/ruff/pull/9356)) - Remove special pre-visit for module docstrings ([#&#8203;9261](https://github.com/astral-sh/ruff/pull/9261)) - Respect `__str__` definitions from super classes ([#&#8203;9338](https://github.com/astral-sh/ruff/pull/9338)) - Respect `unused-noqa` via `per-file-ignores` ([#&#8203;9300](https://github.com/astral-sh/ruff/pull/9300)) - Respect attribute chains when resolving builtin call paths ([#&#8203;9309](https://github.com/astral-sh/ruff/pull/9309)) - Treat all `typing_extensions` members as typing aliases ([#&#8203;9335](https://github.com/astral-sh/ruff/pull/9335)) - Use `Display` for formatter parse errors ([#&#8203;9316](https://github.com/astral-sh/ruff/pull/9316)) - Wrap subscripted dicts in parens for f-string conversion ([#&#8203;9238](https://github.com/astral-sh/ruff/pull/9238)) - \[`flake8-annotations`] Avoid adding return types to stub methods ([#&#8203;9277](https://github.com/astral-sh/ruff/pull/9277)) - \[`flake8-annotations`] Respect mixed `return` and `raise` cases in return-type analysis ([#&#8203;9310](https://github.com/astral-sh/ruff/pull/9310)) - \[`flake8-bandit`] Don't report violations when `SafeLoader` is imported from `yaml.loader` (`S506`) ([#&#8203;9299](https://github.com/astral-sh/ruff/pull/9299)) - \[`pylint`] Avoid panic when comment is preceded by Unicode ([#&#8203;9331](https://github.com/astral-sh/ruff/pull/9331)) - \[`pylint`] Change `PLR0917` error message to match other `PLR09XX` messages ([#&#8203;9308](https://github.com/astral-sh/ruff/pull/9308)) - \[`refurb`] Avoid false positives for `math-constant` (`FURB152`) ([#&#8203;9290](https://github.com/astral-sh/ruff/pull/9290)) ##### Documentation - Expand target name for better rule documentation ([#&#8203;9302](https://github.com/astral-sh/ruff/pull/9302)) - Fix typos found by codespell ([#&#8203;9346](https://github.com/astral-sh/ruff/pull/9346)) - \[`perflint`] Document `PERF102` fix un-safety ([#&#8203;9351](https://github.com/astral-sh/ruff/pull/9351)) - \[`pyupgrade`] Document `UP007` fix un-safety ([#&#8203;9306](https://github.com/astral-sh/ruff/pull/9306)) ### [`v0.1.9`](https://github.com/astral-sh/ruff/blob/HEAD/CHANGELOG.md#019) [Compare Source](https://github.com/astral-sh/ruff/compare/v0.1.8...v0.1.9) ##### Breaking changes - Add site-packages to default exclusions ([#&#8203;9188](https://github.com/astral-sh/ruff/pull/9188)) ##### Preview features - Fix: Avoid parenthesizing subscript targets and values ([#&#8203;9209](https://github.com/astral-sh/ruff/pull/9209)) - \[`pylint`] Implement `too-many-locals` (`PLR0914`) ([#&#8203;9163](https://github.com/astral-sh/ruff/pull/9163)) - Implement `reimplemented_operator` (FURB118) ([#&#8203;9171](https://github.com/astral-sh/ruff/pull/9171)) - Add a rule to detect string members in runtime-evaluated unions ([#&#8203;9143](https://github.com/astral-sh/ruff/pull/9143)) - Implement `no_blank_line_before_class_docstring` preview style ([#&#8203;9154](https://github.com/astral-sh/ruff/pull/9154)) ##### Rule changes - `CONSTANT_CASE` variables are improperly flagged for yoda violation (`SIM300`) ([#&#8203;9164](https://github.com/astral-sh/ruff/pull/9164)) - \[`flake8-pyi`] Cover ParamSpecs and TypeVarTuples (`PYI018`) ([#&#8203;9198](https://github.com/astral-sh/ruff/pull/9198)) - \[`flake8-bugbear`] Add fix for `zip-without-explicit-strict` (`B905`) ([#&#8203;9176](https://github.com/astral-sh/ruff/pull/9176)) - Add fix to automatically remove `print` and `pprint` statements (`T201`, `T203`) ([#&#8203;9208](https://github.com/astral-sh/ruff/pull/9208)) - Prefer `Never` to `NoReturn` in auto-typing in Python >= 3.11 (`ANN201`) ([#&#8203;9213](https://github.com/astral-sh/ruff/pull/9213)) ##### Formatter - `can_omit_optional_parentheses`: Exit early for unparenthesized expressions ([#&#8203;9125](https://github.com/astral-sh/ruff/pull/9125)) - Fix `dynamic` mode with doctests so that it doesn't exceed configured line width ([#&#8203;9129](https://github.com/astral-sh/ruff/pull/9129)) - Fix `can_omit_optional_parentheses` for expressions with a right most fstring ([#&#8203;9124](https://github.com/astral-sh/ruff/pull/9124)) - Add `target_version` to formatter options ([#&#8203;9220](https://github.com/astral-sh/ruff/pull/9220)) ##### CLI - Update `ruff format --check` to display message for already formatted files ([#&#8203;9153](https://github.com/astral-sh/ruff/pull/9153)) ##### Bug fixes - Reverse order of arguments for `operator.contains` ([#&#8203;9192](https://github.com/astral-sh/ruff/pull/9192)) - Iterate over lambdas in deferred type annotations ([#&#8203;9175](https://github.com/astral-sh/ruff/pull/9175)) - Fix panic in `D208` with multibyte indent ([#&#8203;9147](https://github.com/astral-sh/ruff/pull/9147)) - Add support for `NoReturn` in auto-return-typing ([#&#8203;9206](https://github.com/astral-sh/ruff/pull/9206)) - Allow removal of `typing` from `exempt-modules` ([#&#8203;9214](https://github.com/astral-sh/ruff/pull/9214)) - Avoid `mutable-class-default` violations for Pydantic subclasses ([#&#8203;9187](https://github.com/astral-sh/ruff/pull/9187)) - Fix dropped union expressions for piped non-types in `PYI055` autofix ([#&#8203;9161](https://github.com/astral-sh/ruff/pull/9161)) - Enable annotation quoting for multi-line expressions ([#&#8203;9142](https://github.com/astral-sh/ruff/pull/9142)) - Deduplicate edits when quoting annotations ([#&#8203;9140](https://github.com/astral-sh/ruff/pull/9140)) - Prevent invalid utf8 indexing in cell magic detection ([#&#8203;9146](https://github.com/astral-sh/ruff/pull/9146)) - Avoid nested quotations in auto-quoting fix ([#&#8203;9168](https://github.com/astral-sh/ruff/pull/9168)) - Add base-class inheritance detection to flake8-django rules ([#&#8203;9151](https://github.com/astral-sh/ruff/pull/9151)) - Avoid `asyncio-dangling-task` violations on shadowed bindings ([#&#8203;9215](https://github.com/astral-sh/ruff/pull/9215)) ##### Documentation - Fix blog post URL in changelog ([#&#8203;9119](https://github.com/astral-sh/ruff/pull/9119)) - Add error suppression hint for multi-line strings ([#&#8203;9205](https://github.com/astral-sh/ruff/pull/9205)) - Fix typo in SemanticModel.parent_expression docstring ([#&#8203;9167](https://github.com/astral-sh/ruff/pull/9167)) - Document link between import sorting and formatter ([#&#8203;9117](https://github.com/astral-sh/ruff/pull/9117)) ### [`v0.1.8`](https://github.com/astral-sh/ruff/blob/HEAD/CHANGELOG.md#018) [Compare Source](https://github.com/astral-sh/ruff/compare/v0.1.7...v0.1.8) This release includes opt-in support for formatting Python snippets within docstrings via the `docstring-code-format` setting. [Check out the blog post](https://astral.sh/blog/ruff-v0.1.8) for more details! ##### Preview features - Add `"preserve"` quote-style to mimic Black's skip-string-normalization ([#&#8203;8822](https://github.com/astral-sh/ruff/pull/8822)) - Implement `prefer_splitting_right_hand_side_of_assignments` preview style ([#&#8203;8943](https://github.com/astral-sh/ruff/pull/8943)) - \[`pycodestyle`] Add fix for `unexpected-spaces-around-keyword-parameter-equals` ([#&#8203;9072](https://github.com/astral-sh/ruff/pull/9072)) - \[`pycodestyle`] Add fix for comment-related whitespace rules ([#&#8203;9075](https://github.com/astral-sh/ruff/pull/9075)) - \[`pycodestyle`] Allow `sys.path` modifications between imports ([#&#8203;9047](https://github.com/astral-sh/ruff/pull/9047)) - \[`refurb`] Implement `hashlib-digest-hex` (`FURB181`) ([#&#8203;9077](https://github.com/astral-sh/ruff/pull/9077)) ##### Rule changes - Allow `flake8-type-checking` rules to automatically quote runtime-evaluated references ([#&#8203;6001](https://github.com/astral-sh/ruff/pull/6001)) - Allow transparent cell magics in Jupyter Notebooks ([#&#8203;8911](https://github.com/astral-sh/ruff/pull/8911)) - \[`flake8-annotations`] Avoid `ANN2xx` fixes for abstract methods with empty bodies ([#&#8203;9034](https://github.com/astral-sh/ruff/pull/9034)) - \[`flake8-self`] Ignore underscore references in type annotations ([#&#8203;9036](https://github.com/astral-sh/ruff/pull/9036)) - \[`pep8-naming`] Allow class names when `apps.get_model` is a non-string ([#&#8203;9065](https://github.com/astral-sh/ruff/pull/9065)) - \[`pycodestyle`] Allow `matplotlib.use` calls to intersperse imports ([#&#8203;9094](https://github.com/astral-sh/ruff/pull/9094)) - \[`pyflakes`] Support fixing unused assignments in tuples by renaming variables (`F841`) ([#&#8203;9107](https://github.com/astral-sh/ruff/pull/9107)) - \[`pylint`] Add fix for `subprocess-run-without-check` (`PLW1510`) ([#&#8203;6708](https://github.com/astral-sh/ruff/pull/6708)) ##### Formatter - Add `docstring-code-format` knob to enable docstring snippet formatting ([#&#8203;8854](https://github.com/astral-sh/ruff/pull/8854)) - Use double quotes for all docstrings, including single-quoted docstrings ([#&#8203;9020](https://github.com/astral-sh/ruff/pull/9020)) - Implement "dynamic" line width mode for docstring code formatting ([#&#8203;9098](https://github.com/astral-sh/ruff/pull/9098)) - Support reformatting Markdown code blocks ([#&#8203;9030](https://github.com/astral-sh/ruff/pull/9030)) - add support for formatting reStructuredText code snippets ([#&#8203;9003](https://github.com/astral-sh/ruff/pull/9003)) - Avoid trailing comma for single-argument with positional separator ([#&#8203;9076](https://github.com/astral-sh/ruff/pull/9076)) - Fix handling of trailing target comment ([#&#8203;9051](https://github.com/astral-sh/ruff/pull/9051)) ##### CLI - Hide unsafe fix suggestions when explicitly disabled ([#&#8203;9095](https://github.com/astral-sh/ruff/pull/9095)) - Add SARIF support to `--output-format` ([#&#8203;9078](https://github.com/astral-sh/ruff/pull/9078)) ##### Bug fixes - Apply unnecessary index rule prior to enumerate rewrite ([#&#8203;9012](https://github.com/astral-sh/ruff/pull/9012)) - \[`flake8-err-msg`] Allow `EM` fixes even if `msg` variable is defined ([#&#8203;9059](https://github.com/astral-sh/ruff/pull/9059)) - \[`flake8-pie`] Prevent keyword arguments duplication ([#&#8203;8450](https://github.com/astral-sh/ruff/pull/8450)) - \[`flake8-pie`] Respect trailing comma in `unnecessary-dict-kwargs` (`PIE804`) ([#&#8203;9015](https://github.com/astral-sh/ruff/pull/9015)) - \[`flake8-raise`] Avoid removing parentheses on ctypes.WinError ([#&#8203;9027](https://github.com/astral-sh/ruff/pull/9027)) - \[`isort`] Avoid invalid combination of `force-sort-within-types` and `lines-between-types` ([#&#8203;9041](https://github.com/astral-sh/ruff/pull/9041)) - \[`isort`] Ensure that from-style imports are always ordered first in `__future__` ([#&#8203;9039](https://github.com/astral-sh/ruff/pull/9039)) - \[`pycodestyle`] Allow tab indentation before keyword ([#&#8203;9099](https://github.com/astral-sh/ruff/pull/9099)) - \[`pylint`] Ignore `@overrides` and `@overloads` for `too-many-positional` ([#&#8203;9000](https://github.com/astral-sh/ruff/pull/9000)) - \[`pyupgrade`] Enable `printf-string-formatting` fix with comments on right-hand side ([#&#8203;9037](https://github.com/astral-sh/ruff/pull/9037)) - \[`refurb`] Make `math-constant` (`FURB152`) rule more targeted ([#&#8203;9054](https://github.com/astral-sh/ruff/pull/9054)) - \[`refurb`] Support floating-point base in `redundant-log-base` (`FURB163`) ([#&#8203;9100](https://github.com/astral-sh/ruff/pull/9100)) - \[`ruff`] Detect `unused-asyncio-dangling-task` (`RUF006`) on unused assignments ([#&#8203;9060](https://github.com/astral-sh/ruff/pull/9060)) ### [`v0.1.7`](https://github.com/astral-sh/ruff/blob/HEAD/CHANGELOG.md#017) [Compare Source](https://github.com/astral-sh/ruff/compare/v0.1.6...v0.1.7) ##### Preview features - Implement multiline dictionary and list hugging for preview style ([#&#8203;8293](https://github.com/astral-sh/ruff/pull/8293)) - Implement the `fix_power_op_line_length` preview style ([#&#8203;8947](https://github.com/astral-sh/ruff/pull/8947)) - Use Python version to determine typing rewrite safety ([#&#8203;8919](https://github.com/astral-sh/ruff/pull/8919)) - \[`flake8-annotations`] Enable auto-return-type involving `Optional` and `Union` annotations ([#&#8203;8885](https://github.com/astral-sh/ruff/pull/8885)) - \[`flake8-bandit`] Implement `django-raw-sql` (`S611`) ([#&#8203;8651](https://github.com/astral-sh/ruff/pull/8651)) - \[`flake8-bandit`] Implement `tarfile-unsafe-members` (`S202`) ([#&#8203;8829](https://github.com/astral-sh/ruff/pull/8829)) - \[`flake8-pyi`] Implement fix for `unnecessary-literal-union` (`PYI030`) ([#&#8203;7934](https://github.com/astral-sh/ruff/pull/7934)) - \[`flake8-simplify`] Extend `dict-get-with-none-default` (`SIM910`) to non-literals ([#&#8203;8762](https://github.com/astral-sh/ruff/pull/8762)) - \[`pylint`] - add `unnecessary-list-index-lookup` (`PLR1736`) + autofix ([#&#8203;7999](https://github.com/astral-sh/ruff/pull/7999)) - \[`pylint`] - implement R0202 and R0203 with autofixes ([#&#8203;8335](https://github.com/astral-sh/ruff/pull/8335)) - \[`pylint`] Implement `repeated-keyword` (`PLe1132`) ([#&#8203;8706](https://github.com/astral-sh/ruff/pull/8706)) - \[`pylint`] Implement `too-many-positional` (`PLR0917`) ([#&#8203;8995](https://github.com/astral-sh/ruff/pull/8995)) - \[`pylint`] Implement `unnecessary-dict-index-lookup` (`PLR1733`) ([#&#8203;8036](https://github.com/astral-sh/ruff/pull/8036)) - \[`refurb`] Implement `redundant-log-base` (`FURB163`) ([#&#8203;8842](https://github.com/astral-sh/ruff/pull/8842)) ##### Rule changes - \[`flake8-boolean-trap`] Allow booleans in `@override` methods ([#&#8203;8882](https://github.com/astral-sh/ruff/pull/8882)) - \[`flake8-bugbear`] Avoid `B015`,`B018` for last expression in a cell ([#&#8203;8815](https://github.com/astral-sh/ruff/pull/8815)) - \[`flake8-pie`] Allow ellipses for enum values in stub files ([#&#8203;8825](https://github.com/astral-sh/ruff/pull/8825)) - \[`flake8-pyi`] Check PEP 695 type aliases for `snake-case-type-alias` and `t-suffixed-type-alias` ([#&#8203;8966](https://github.com/astral-sh/ruff/pull/8966)) - \[`flake8-pyi`] Check for kwarg and vararg `NoReturn` type annotations ([#&#8203;8948](https://github.com/astral-sh/ruff/pull/8948)) - \[`flake8-simplify`] Omit select context managers from `SIM117` ([#&#8203;8801](https://github.com/astral-sh/ruff/pull/8801)) - \[`pep8-naming`] Allow Django model loads in `non-lowercase-variable-in-function` (`N806`) ([#&#8203;8917](https://github.com/astral-sh/ruff/pull/8917)) - \[`pycodestyle`] Avoid `E703` for last expression in a cell ([#&#8203;8821](https://github.com/astral-sh/ruff/pull/8821)) - \[`pycodestyle`] Update `E402` to work at cell level for notebooks ([#&#8203;8872](https://github.com/astral-sh/ruff/pull/8872)) - \[`pydocstyle`] Avoid `D100` for Jupyter Notebooks ([#&#8203;8816](https://github.com/astral-sh/ruff/pull/8816)) - \[`pylint`] Implement fix for `unspecified-encoding` (`PLW1514`) ([#&#8203;8928](https://github.com/astral-sh/ruff/pull/8928)) ##### Formatter - Avoid unstable formatting in ellipsis-only body with trailing comment ([#&#8203;8984](https://github.com/astral-sh/ruff/pull/8984)) - Inline trailing comments for type alias similar to assignments ([#&#8203;8941](https://github.com/astral-sh/ruff/pull/8941)) - Insert trailing comma when function breaks with single argument ([#&#8203;8921](https://github.com/astral-sh/ruff/pull/8921)) ##### CLI - Update `ruff check` and `ruff format` to default to the current directory ([#&#8203;8791](https://github.com/astral-sh/ruff/pull/8791)) - Stop at the first resolved parent configuration ([#&#8203;8864](https://github.com/astral-sh/ruff/pull/8864)) ##### Configuration - \[`pylint`] Default `max-positional-args` to `max-args` ([#&#8203;8998](https://github.com/astral-sh/ruff/pull/8998)) - \[`pylint`] Add `allow-dunder-method-names` setting for `bad-dunder-method-name` (`PLW3201`) ([#&#8203;8812](https://github.com/astral-sh/ruff/pull/8812)) - \[`isort`] Add support for `from-first` setting ([#&#8203;8663](https://github.com/astral-sh/ruff/pull/8663)) - \[`isort`] Add support for `length-sort` settings ([#&#8203;8841](https://github.com/astral-sh/ruff/pull/8841)) ##### Bug fixes - Add support for `@functools.singledispatch` ([#&#8203;8934](https://github.com/astral-sh/ruff/pull/8934)) - Avoid off-by-one error in stripping noqa following multi-byte char ([#&#8203;8979](https://github.com/astral-sh/ruff/pull/8979)) - Avoid off-by-one error in with-item named expressions ([#&#8203;8915](https://github.com/astral-sh/ruff/pull/8915)) - Avoid syntax error via invalid ur string prefix ([#&#8203;8971](https://github.com/astral-sh/ruff/pull/8971)) - Avoid underflow in `get_model` matching ([#&#8203;8965](https://github.com/astral-sh/ruff/pull/8965)) - Avoid unnecessary index diagnostics when value is modified ([#&#8203;8970](https://github.com/astral-sh/ruff/pull/8970)) - Convert over-indentation rule to use number of characters ([#&#8203;8983](https://github.com/astral-sh/ruff/pull/8983)) - Detect implicit returns in auto-return-types ([#&#8203;8952](https://github.com/astral-sh/ruff/pull/8952)) - Fix start >= end error in over-indentation ([#&#8203;8982](https://github.com/astral-sh/ruff/pull/8982)) - Ignore `@overload` and `@override` methods for too-many-arguments checks ([#&#8203;8954](https://github.com/astral-sh/ruff/pull/8954)) - Lexer start of line is false only for `Mode::Expression` ([#&#8203;8880](https://github.com/astral-sh/ruff/pull/8880)) - Mark `pydantic_settings.BaseSettings` as having default copy semantics ([#&#8203;8793](https://github.com/astral-sh/ruff/pull/8793)) - Respect dictionary unpacking in `NamedTuple` assignments ([#&#8203;8810](https://github.com/astral-sh/ruff/pull/8810)) - Respect local subclasses in `flake8-type-checking` ([#&#8203;8768](https://github.com/astral-sh/ruff/pull/8768)) - Support type alias statements in simple statement positions ([#&#8203;8916](https://github.com/astral-sh/ruff/pull/8916)) - \[`flake8-annotations`] Avoid filtering out un-representable types in return annotation ([#&#8203;8881](https://github.com/astral-sh/ruff/pull/8881)) - \[`flake8-pie`] Retain extra ellipses in protocols and abstract methods ([#&#8203;8769](https://github.com/astral-sh/ruff/pull/8769)) - \[`flake8-pyi`] Respect local enum subclasses in `simple-defaults` (`PYI052`) ([#&#8203;8767](https://github.com/astral-sh/ruff/pull/8767)) - \[`flake8-trio`] Use correct range for `TRIO115` fix ([#&#8203;8933](https://github.com/astral-sh/ruff/pull/8933)) - \[`flake8-trio`] Use full arguments range for zero-sleep-call ([#&#8203;8936](https://github.com/astral-sh/ruff/pull/8936)) - \[`isort`] fix: mark `__main__` as first-party import ([#&#8203;8805](https://github.com/astral-sh/ruff/pull/8805)) - \[`pep8-naming`] Avoid `N806` errors for type alias statements ([#&#8203;8785](https://github.com/astral-sh/ruff/pull/8785)) - \[`perflint`] Avoid `PERF101` if there's an append in loop body ([#&#8203;8809](https://github.com/astral-sh/ruff/pull/8809)) - \[`pycodestyle`] Allow space-before-colon after end-of-slice ([#&#8203;8838](https://github.com/astral-sh/ruff/pull/8838)) - \[`pydocstyle`] Avoid non-character breaks in `over-indentation` (`D208`) ([#&#8203;8866](https://github.com/astral-sh/ruff/pull/8866)) - \[`pydocstyle`] Ignore underlines when determining docstring logical lines ([#&#8203;8929](https://github.com/astral-sh/ruff/pull/8929)) - \[`pylint`] Extend `self-assigning-variable` to multi-target assignments ([#&#8203;8839](https://github.com/astral-sh/ruff/pull/8839)) - \[`tryceratops`] Avoid repeated triggers in nested `tryceratops` diagnostics ([#&#8203;8772](https://github.com/astral-sh/ruff/pull/8772)) ##### Documentation - Add advice for fixing RUF008 when mutability is not desired ([#&#8203;8853](https://github.com/astral-sh/ruff/pull/8853)) - Added the command to run ruff using pkgx to the installation.md ([#&#8203;8955](https://github.com/astral-sh/ruff/pull/8955)) - Document fix safety for flake8-comprehensions and some pyupgrade rules ([#&#8203;8918](https://github.com/astral-sh/ruff/pull/8918)) - Fix doc formatting for zero-sleep-call ([#&#8203;8937](https://github.com/astral-sh/ruff/pull/8937)) - Remove duplicate imports from os-stat documentation ([#&#8203;8930](https://github.com/astral-sh/ruff/pull/8930)) - Replace generated reference to MkDocs ([#&#8203;8806](https://github.com/astral-sh/ruff/pull/8806)) - Update Arch Linux package URL in installation.md ([#&#8203;8802](https://github.com/astral-sh/ruff/pull/8802)) - \[`flake8-pyi`] Fix error in `t-suffixed-type-alias` (`PYI043`) example ([#&#8203;8963](https://github.com/astral-sh/ruff/pull/8963)) - \[`flake8-pyi`] Improve motivation for `custom-type-var-return-type` (`PYI019`) ([#&#8203;8766](https://github.com/astral-sh/ruff/pull/8766)) ### [`v0.1.6`](https://github.com/astral-sh/ruff/blob/HEAD/CHANGELOG.md#016) [Compare Source](https://github.com/astral-sh/ruff/compare/v0.1.5...v0.1.6) ##### Preview features - \[`flake8-boolean-trap`] Extend `boolean-type-hint-positional-argument` (`FBT001`) to include booleans in unions ([#&#8203;7501](https://github.com/astral-sh/ruff/pull/7501)) - \[`flake8-pie`] Extend `reimplemented-list-builtin` (`PIE807`) to `dict` reimplementations ([#&#8203;8608](https://github.com/astral-sh/ruff/pull/8608)) - \[`flake8-pie`] Extend `unnecessary-pass` (`PIE790`) to include ellipses (`...`) ([#&#8203;8641](https://github.com/astral-sh/ruff/pull/8641)) - \[`flake8-pie`] Implement fix for `unnecessary-spread` (`PIE800`) ([#&#8203;8668](https://github.com/astral-sh/ruff/pull/8668)) - \[`flake8-quotes`] Implement `unnecessary-escaped-quote` (`Q004`) ([#&#8203;8630](https://github.com/astral-sh/ruff/pull/8630)) - \[`pycodestyle`] Implement fix for `multiple-spaces-after-keyword` (`E271`) and `multiple-spaces-before-keyword` (`E272`) ([#&#8203;8622](https://github.com/astral-sh/ruff/pull/8622)) - \[`pycodestyle`] Implement fix for `multiple-spaces-after-operator` (`E222`) and `multiple-spaces-before-operator` (`E221`) ([#&#8203;8623](https://github.com/astral-sh/ruff/pull/8623)) - \[`pyflakes`] Extend `is-literal` (`F632`) to include comparisons against mutable initializers ([#&#8203;8607](https://github.com/astral-sh/ruff/pull/8607)) - \[`pylint`] Implement `redefined-argument-from-local` (`PLR1704`) ([#&#8203;8159](https://github.com/astral-sh/ruff/pull/8159)) - \[`pylint`] Implement fix for `unnecessary-lambda` (`PLW0108`) ([#&#8203;8621](https://github.com/astral-sh/ruff/pull/8621)) - \[`refurb`] Implement `if-expr-min-max` (`FURB136`) ([#&#8203;8664](https://github.com/astral-sh/ruff/pull/8664)) - \[`refurb`] Implement `math-constant` (`FURB152`) ([#&#8203;8727](https://github.com/astral-sh/ruff/pull/8727)) ##### Rule changes - \[`flake8-annotations`] Add autotyping-like return type inference for annotation rules ([#&#8203;8643](https://github.com/astral-sh/ruff/pull/8643)) - \[`flake8-future-annotations`] Implement fix for `future-required-type-annotation` (`FA102`) ([#&#8203;8711](https://github.com/astral-sh/ruff/pull/8711)) - \[`flake8-implicit-namespace-package`] Avoid missing namespace violations in scripts with shebangs ([#&#8203;8710](https://github.com/astral-sh/ruff/pull/8710)) - \[`pydocstyle`] Update `over-indentation` (`D208`) to preserve indentation offsets when fixing overindented lines ([#&#8203;8699](https://github.com/astral-sh/ruff/pull/8699)) - \[`pyupgrade`] Refine `timeout-error-alias` (`UP041`) to remove false positives ([#&#8203;8587](https://github.com/astral-sh/ruff/pull/8587)) ##### Formatter - Fix instability in `await` formatting with fluent style ([#&#8203;8676](https://github.com/astral-sh/ruff/pull/8676)) - Compare formatted and unformatted ASTs during formatter tests ([#&#8203;8624](https://github.com/astral-sh/ruff/pull/8624)) - Preserve trailing semicolon for Notebooks ([#&#8203;8590](https://github.com/astral-sh/ruff/pull/8590)) ##### CLI - Improve debug printing for resolving origin of config settings ([#&#8203;8729](https://github.com/astral-sh/ruff/pull/8729)) - Write unchanged, excluded files to stdout when read via stdin ([#&#8203;8596](https://github.com/astral-sh/ruff/pull/8596)) ##### Configuration - \[`isort`] Support disabling sections with `no-sections = true` ([#&#8203;8657](https://github.com/astral-sh/ruff/pull/8657)) - \[`pep8-naming`] Support local and dynamic class- and static-method decorators ([#&#8203;8592](https://github.com/astral-sh/ruff/pull/8592)) - \[`pydocstyle`] Allow overriding pydocstyle convention rules ([#&#8203;8586](https://github.com/astral-sh/ruff/pull/8586)) ##### Bug fixes - Avoid syntax error via importing `trio.lowlevel` ([#&#8203;8730](https://github.com/astral-sh/ruff/pull/8730)) - Omit unrolled augmented assignments in `PIE794` ([#&#8203;8634](https://github.com/astral-sh/ruff/pull/8634)) - Slice source code instead of generating it for `EM` fixes ([#&#8203;7746](https://github.com/astral-sh/ruff/pull/7746)) - Allow whitespace around colon in slices for `whitespace-before-punctuation` (`E203`) ([#&#8203;8654](https://github.com/astral-sh/ruff/pull/8654)) - Use function range for `no-self-use` ([#&#8203;8637](https://github.com/astral-sh/ruff/pull/8637)) - F-strings doesn't contain bytes literal for `PLW0129` ([#&#8203;8675](https://github.com/astral-sh/ruff/pull/8675)) - Improve detection of `TYPE_CHECKING` blocks imported from `typing_extensions` or `_typeshed` ([#&#8203;8429](https://github.com/astral-sh/ruff/pull/8429)) - Treat display as a builtin in IPython ([#&#8203;8707](https://github.com/astral-sh/ruff/pull/8707)) - Avoid `FURB113` autofix if comments are present ([#&#8203;8494](https://github.com/astral-sh/ruff/pull/8494)) - Consider the new f-string tokens for `flake8-commas` ([#&#8203;8582](https://github.com/astral-sh/ruff/pull/8582)) - Remove erroneous bad-dunder-name reference ([#&#8203;8742](https://github.com/astral-sh/ruff/pull/8742)) - Avoid recommending Self usages in metaclasses ([#&#8203;8639](https://github.com/astral-sh/ruff/pull/8639)) - Detect runtime-evaluated base classes defined in the current file ([#&#8203;8572](https://github.com/astral-sh/ruff/pull/8572)) - Avoid inserting trailing commas within f-strings ([#&#8203;8574](https://github.com/astral-sh/ruff/pull/8574)) - Remove incorrect deprecation label for stdout and stderr ([#&#8203;8743](https://github.com/astral-sh/ruff/pull/8743)) - Fix unnecessary parentheses in UP007 fix ([#&#8203;8610](https://github.com/astral-sh/ruff/pull/8610)) - Remove repeated and erroneous scoped settings headers in docs ([#&#8203;8670](https://github.com/astral-sh/ruff/pull/8670)) - Trim trailing empty strings when converting to f-strings ([#&#8203;8712](https://github.com/astral-sh/ruff/pull/8712)) - Fix ordering for `force-sort-within-sections` ([#&#8203;8665](https://github.com/astral-sh/ruff/pull/8665)) - Run unicode prefix rule over tokens ([#&#8203;8709](https://github.com/astral-sh/ruff/pull/8709)) - Update UP032 to unescape curly braces in literal parts of converted strings ([#&#8203;8697](https://github.com/astral-sh/ruff/pull/8697)) - List all ipython builtins ([#&#8203;8719](https://github.com/astral-sh/ruff/pull/8719)) ##### Documentation - Document conventions in the FAQ ([#&#8203;8638](https://github.com/astral-sh/ruff/pull/8638)) - Redirect from rule codes to rule pages in docs ([#&#8203;8636](https://github.com/astral-sh/ruff/pull/8636)) - Fix permalink to convention setting ([#&#8203;8575](https://github.com/astral-sh/ruff/pull/8575)) ### [`v0.1.5`](https://github.com/astral-sh/ruff/blob/HEAD/CHANGELOG.md#015) [Compare Source](https://github.com/astral-sh/ruff/compare/v0.1.4...v0.1.5) ##### Preview features - \[`flake8-bandit`] Implement `mako-templates` (`S702`) ([#&#8203;8533](https://github.com/astral-sh/ruff/pull/8533)) - \[`flake8-trio`] Implement `TRIO105` ([#&#8203;8490](https://github.com/astral-sh/ruff/pull/8490)) - \[`flake8-trio`] Implement `TRIO109` ([#&#8203;8534](https://github.com/astral-sh/ruff/pull/8534)) - \[`flake8-trio`] Implement `TRIO110` ([#&#8203;8537](https://github.com/astral-sh/ruff/pull/8537)) - \[`flake8-trio`] Implement `TRIO115` ([#&#8203;8486](https://github.com/astral-sh/ruff/pull/8486)) - \[`refurb`] Implement `type-none-comparison` (`FURB169`) ([#&#8203;8487](https://github.com/astral-sh/ruff/pull/8487)) - Flag all comparisons against builtin types in `E721` ([#&#8203;8491](https://github.com/astral-sh/ruff/pull/8491)) - Make `SIM118` fix as safe when the expression is a known dictionary ([#&#8203;8525](https://github.com/astral-sh/ruff/pull/8525)) ##### Formatter - Fix multiline lambda expression statement formatting ([#&#8203;8466](https://github.com/astral-sh/ruff/pull/8466)) ##### CLI - Add hidden `--extension` to override inference of source type from file extension ([#&#8203;8373](https://github.com/astral-sh/ruff/pull/8373)) ##### Configuration - Account for selector specificity when merging `extend_unsafe_fixes` and `override extend_safe_fixes` ([#&#8203;8444](https://github.com/astral-sh/ruff/pull/8444)) - Add support for disabling cache with `RUFF_NO_CACHE` environment variable ([#&#8203;8538](https://github.com/astral-sh/ruff/pull/8538)) ##### Bug fixes - \[`E721`] Flag comparisons to `memoryview` ([#&#8203;8485](https://github.com/astral-sh/ruff/pull/8485)) - Allow collapsed-ellipsis bodies in other statements ([#&#8203;8499](https://github.com/astral-sh/ruff/pull/8499)) - Avoid `D301` autofix for `u` prefixed strings ([#&#8203;8495](https://github.com/astral-sh/ruff/pull/8495)) - Only flag `flake8-trio` rules when `trio` import is present ([#&#8203;8550](https://github.com/astral-sh/ruff/pull/8550)) - Reject more syntactically invalid Python programs ([#&#8203;8524](https://github.com/astral-sh/ruff/pull/8524)) - Avoid raising `TRIO115` violations for `trio.sleep(...)` calls with non-number values ([#&#8203;8532](https://github.com/astral-sh/ruff/pull/8532)) - Fix `F841` false negative on assignment to multiple variables ([#&#8203;8489](https://github.com/astral-sh/ruff/pull/8489)) ##### Documentation - Fix link to isort `known-first-party` ([#&#8203;8562](https://github.com/astral-sh/ruff/pull/8562)) - Add notes on fix safety to a few rules ([#&#8203;8500](https://github.com/astral-sh/ruff/pull/8500)) - Add missing toml config tabs ([#&#8203;8512](https://github.com/astral-sh/ruff/pull/8512)) - Add instructions for configuration of Emacs ([#&#8203;8488](https://github.com/astral-sh/ruff/pull/8488)) - Improve detail link contrast in dark mode ([#&#8203;8548](https://github.com/astral-sh/ruff/pull/8548)) - Fix typo in example ([#&#8203;8506](https://github.com/astral-sh/ruff/pull/8506)) - Added tabs for configuration files in the documentation ([#&#8203;8480](https://github.com/astral-sh/ruff/pull/8480)) - Recommend `project.requires-python` over `target-version` ([#&#8203;8513](https://github.com/astral-sh/ruff/pull/8513)) - Add singleton escape hatch to `B008` documentation ([#&#8203;8501](https://github.com/astral-sh/ruff/pull/8501)) - Fix tab configuration docs ([#&#8203;8502](https://github.com/astral-sh/ruff/pull/8502)) ### [`v0.1.4`](https://github.com/astral-sh/ruff/blob/HEAD/CHANGELOG.md#014) [Compare Source](https://github.com/astral-sh/ruff/compare/v0.1.3...v0.1.4) ##### Preview features - \[`flake8-trio`] Implement `timeout-without-await` (`TRIO001`) ([#&#8203;8439](https://github.com/astral-sh/ruff/pull/8439)) - \[`numpy`] Implement NumPy 2.0 migration rule (`NPY200`) ([#&#8203;7702](https://github.com/astral-sh/ruff/pull/7702)) - \[`pylint`] Implement `bad-open-mode` (`W1501`) ([#&#8203;8294](https://github.com/astral-sh/ruff/pull/8294)) - \[`pylint`] Implement `import-outside-toplevel` (`C0415`) rule ([#&#8203;5180](https://github.com/astral-sh/ruff/pull/5180)) - \[`pylint`] Implement `useless-with-lock` (`W2101`) ([#&#8203;8321](https://github.com/astral-sh/ruff/pull/8321)) - \[`pyupgrade`] Implement `timeout-error-alias` (`UP041`) ([#&#8203;8476](https://github.com/astral-sh/ruff/pull/8476)) - \[`refurb`] Implement `isinstance-type-none` (`FURB168`) ([#&#8203;8308](https://github.com/astral-sh/ruff/pull/8308)) - Detect confusable Unicode-to-Unicode units in `RUF001`, `RUF002`, and `RUF003` ([#&#8203;4430](https://github.com/astral-sh/ruff/pull/4430)) - Add newline after module docstrings in preview style ([#&#8203;8283](https://github.com/astral-sh/ruff/pull/8283)) ##### Formatter - Add a note on line-too-long to the formatter docs ([#&#8203;8314](https://github.com/astral-sh/ruff/pull/8314)) - Preserve trailing statement semicolons when using `fmt: skip` ([#&#8203;8273](https://github.com/astral-sh/ruff/pull/8273)) - Preserve trailing semicolons when using `fmt: off` ([#&#8203;8275](https://github.com/astral-sh/ruff/pull/8275)) - Avoid duplicating linter-formatter compatibility warnings ([#&#8203;8292](https://github.com/astral-sh/ruff/pull/8292)) - Avoid inserting a newline after function docstrings ([#&#8203;8375](https://github.com/astral-sh/ruff/pull/8375)) - Insert newline between docstring and following own line comment ([#&#8203;8216](https://github.com/astral-sh/ruff/pull/8216)) - Split tuples in return positions by comma first ([#&#8203;8280](https://github.com/astral-sh/ruff/pull/8280)) - Avoid treating byte strings as docstrings ([#&#8203;8350](https://github.com/astral-sh/ruff/pull/8350)) - Add `--line-length` option to `format` command ([#&#8203;8363](https://github.com/astral-sh/ruff/pull/8363)) - Avoid parenthesizing unsplittable because of comments ([#&#8203;8431](https://github.com/astral-sh/ruff/pull/8431)) ##### CLI - Add `--output-format` to `ruff rule` and `ruff linter` ([#&#8203;8203](https://github.com/astral-sh/ruff/pull/8203)) ##### Bug fixes - Respect `--force-exclude` in `lint.exclude` and `format.exclude` ([#&#8203;8393](https://github.com/astral-sh/ruff/pull/8393)) - Respect `--extend-per-file-ignores` on the CLI ([#&#8203;8329](https://github.com/astral-sh/ruff/pull/8329)) - Extend `bad-dunder-method-name` to permit `__index__` ([#&#8203;8300](https://github.com/astral-sh/ruff/pull/8300)) - Fix panic with 8 in octal escape ([#&#8203;8356](https://github.com/astral-sh/ruff/pull/8356)) - Avoid raising `D300` when both triple quote styles are present ([#&#8203;8462](https://github.com/astral-sh/ruff/pull/8462)) - Consider unterminated f-strings in `FStringRanges` ([#&#8203;8154](https://github.com/astral-sh/ruff/pull/8154)) - Avoid including literal `shell=True` for truthy, non-`True` diagnostics ([#&#8203;8359](https://github.com/astral-sh/ruff/pull/8359)) - Avoid triggering single-element test for starred expressions ([#&#8203;8433](https://github.com/astral-sh/ruff/pull/8433)) - Detect and ignore Jupyter automagics ([#&#8203;8398](https://github.com/astral-sh/ruff/pull/8398)) - Fix invalid E231 error with f-strings ([#&#8203;8369](https://github.com/astral-sh/ruff/pull/8369)) - Avoid triggering `NamedTuple` rewrite with starred annotation ([#&#8203;8434](https://github.com/astral-sh/ruff/pull/8434)) - Avoid un-setting bracket flag in logical lines ([#&#8203;8380](https://github.com/astral-sh/ruff/pull/8380)) - Place 'r' prefix before 'f' for raw format strings ([#&#8203;8464](https://github.com/astral-sh/ruff/pull/8464)) - Remove trailing periods from NumPy 2.0 code actions ([#&#8203;8475](https://github.com/astral-sh/ruff/pull/8475)) - Fix bug where `PLE1307` was raised when formatting `%c` with characters ([#&#8203;8407](https://github.com/astral-sh/ruff/pull/8407)) - Remove unicode flag from comparable ([#&#8203;8440](https://github.com/astral-sh/ruff/pull/8440)) - Improve B015 message ([#&#8203;8295](https://github.com/astral-sh/ruff/pull/8295)) - Use `fixedOverflowWidgets` for playground popover ([#&#8203;8458](https://github.com/astral-sh/ruff/pull/8458)) - Mark `byte_bounds` as a non-backwards-compatible NumPy 2.0 change ([#&#8203;8474](https://github.com/astral-sh/ruff/pull/8474)) ##### Internals - Add a dedicated cache directory per Ruff version ([#&#8203;8333](https://github.com/astral-sh/ruff/pull/8333)) - Allow selective caching for `--fix` and `--diff` ([#&#8203;8316](https://github.com/astral-sh/ruff/pull/8316)) - Improve performance of comment parsing ([#&#8203;8193](https://github.com/astral-sh/ruff/pull/8193)) - Improve performance of string parsing ([#&#8203;8227](https://github.com/astral-sh/ruff/pull/8227)) - Use a dedicated sort key for isort import sorting ([#&#8203;7963](https://github.com/astral-sh/ruff/pull/7963)) ### [`v0.1.3`](https://github.com/astral-sh/ruff/blob/HEAD/CHANGELOG.md#013) [Compare Source](https://github.com/astral-sh/ruff/compare/v0.1.2...v0.1.3) This release includes a variety of improvements to the Ruff formatter, removing several known and unintentional deviations from Black. ##### Formatter - Avoid space around pow for `None`, `True` and `False` ([#&#8203;8189](https://github.com/astral-sh/ruff/pull/8189)) - Avoid sorting all paths in the format command ([#&#8203;8181](https://github.com/astral-sh/ruff/pull/8181)) - Insert necessary blank line between class and leading comments ([#&#8203;8224](https://github.com/astral-sh/ruff/pull/8224)) - Avoid introducing new parentheses in annotated assignments ([#&#8203;8233](https://github.com/astral-sh/ruff/pull/8233)) - Refine the warnings about incompatible linter options ([#&#8203;8196](https://github.com/astral-sh/ruff/pull/8196)) - Add test and basic implementation for formatter preview mode ([#&#8203;8044](https://github.com/astral-sh/ruff/pull/8044)) - Refine warning about incompatible `isort` settings ([#&#8203;8192](https://github.com/astral-sh/ruff/pull/8192)) - Only omit optional parentheses for starting or ending with parentheses ([#&#8203;8238](https://github.com/astral-sh/ruff/pull/8238)) - Use source type to determine parser mode for formatting ([#&#8203;8205](https://github.com/astral-sh/ruff/pull/8205)) - Don't warn about magic trailing comma when `isort.force-single-line` is true ([#&#8203;8244](https://github.com/astral-sh/ruff/pull/8244)) - Use `SourceKind::diff` for formatter ([#&#8203;8240](https://github.com/astral-sh/ruff/pull/8240)) - Fix `fmt:off` with trailing child comment ([#&#8203;8234](https://github.com/astral-sh/ruff/pull/8234)) - Formatter parentheses support for `IpyEscapeCommand` ([#&#8203;8207](https://github.com/astral-sh/ruff/pull/8207)) ##### Linter - \[`pylint`] Add buffer methods to `bad-dunder-method-name` (`PLW3201`) exclusions ([#&#8203;8190](https://github.com/astral-sh/ruff/pull/8190)) - Match rule prefixes from `external` codes setting in `unused-noqa` ([#&#8203;8177](https://github.com/astral-sh/ruff/pull/8177)) - Use `line-length` setting for isort in lieu of `pycodestyle.max-line-length` ([#&#8203;8235](https://github.com/astral-sh/ruff/pull/8235)) - Update fix for `unnecessary-paren-on-raise-exception` to unsafe for unknown types ([#&#8203;8231](https://github.com/astral-sh/ruff/pull/8231)) - Correct quick fix message for `W605` ([#&#8203;8255](https://github.com/astral-sh/ruff/pull/8255)) ##### Documentation - Fix typo in max-doc-length documentation ([#&#8203;8201](https://github.com/astral-sh/ruff/pull/8201)) - Improve documentation around linter-formatter conflicts ([#&#8203;8257](https://github.com/astral-sh/ruff/pull/8257)) - Fix link to error suppression documentation in `unused-noqa` ([#&#8203;8172](https://github.com/astral-sh/ruff/pull/8172)) - Add `external` option to `unused-noqa` documentation ([#&#8203;8171](https://github.com/astral-sh/ruff/pull/8171)) - Add title attribute to icons ([#&#8203;8060](https://github.com/astral-sh/ruff/pull/8060)) - Clarify unsafe case in RSE102 ([#&#8203;8256](https://github.com/astral-sh/ruff/pull/8256)) - Fix skipping formatting examples ([#&#8203;8210](https://github.com/astral-sh/ruff/pull/8210)) - docs: fix name of `magic-trailing-comma` option in README ([#&#8203;8200](https://github.com/astral-sh/ruff/pull/8200)) - Add note about scope of rule changing in versioning policy ([#&#8203;8169](https://github.com/astral-sh/ruff/pull/8169)) - Document: Fix default lint rules ([#&#8203;8218](https://github.com/astral-sh/ruff/pull/8218)) - Fix a wrong setting in configuration.md ([#&#8203;8186](https://github.com/astral-sh/ruff/pull/8186)) - Fix misspelled TOML headers in the tutorial ([#&#8203;8209](https://github.com/astral-sh/ruff/pull/8209)) ### [`v0.1.2`](https://github.com/astral-sh/ruff/blob/HEAD/CHANGELOG.md#012) [Compare Source](https://github.com/astral-sh/ruff/compare/v0.1.1...v0.1.2) This release includes the Beta version of the Ruff formatter — an extremely fast, Black-compatible Python formatter. Try it today with `ruff format`! [Check out the blog post](https://astral.sh/blog/the-ruff-formatter) and [read the docs](https://docs.astral.sh/ruff/formatter/). ##### Preview features - \[`pylint`] Implement `non-ascii-module-import` (`C2403`) ([#&#8203;8056](https://github.com/astral-sh/ruff/pull/8056)) - \[`pylint`] implement `non-ascii-name` (`C2401`) ([#&#8203;8038](https://github.com/astral-sh/ruff/pull/8038)) - \[`pylint`] Implement unnecessary-lambda (W0108) ([#&#8203;7953](https://github.com/astral-sh/ruff/pull/7953)) - \[`refurb`] Implement `read-whole-file` (`FURB101`) ([#&#8203;7682](https://github.com/astral-sh/ruff/pull/7682)) - Add fix for `E223`, `E224`, and `E242` ([#&#8203;8143](https://github.com/astral-sh/ruff/pull/8143)) - Add fix for `E225`, `E226`, `E227`, and `E228` ([#&#8203;8136](https://github.com/astral-sh/ruff/pull/8136)) - Add fix for `E252` ([#&#8203;8142](https://github.com/astral-sh/ruff/pull/8142)) - Add fix for `E261` ([#&#8203;8114](https://github.com/astral-sh/ruff/pull/8114)) - Add fix for `E273` and `E274` ([#&#8203;8144](https://github.com/astral-sh/ruff/pull/8144)) - Add fix for `E275` ([#&#8203;8133](https://github.com/astral-sh/ruff/pull/8133)) - Update `SIM401` to catch ternary operations ([#&#8203;7415](https://github.com/astral-sh/ruff/pull/7415)) - Update `E721` to allow `is` and `is` not for direct type comparisons ([#&#8203;7905](https://github.com/astral-sh/ruff/pull/7905)) ##### Rule changes - Add `backports.strenum` to `deprecated-imports` ([#&#8203;8113](https://github.com/astral-sh/ruff/pull/8113)) - Update `SIM112` to ignore `https_proxy`, `http_proxy`, and `no_proxy` ([#&#8203;8140](https://github.com/astral-sh/ruff/pull/8140)) - Update fix for `literal-membership` (`PLR6201`) to be unsafe ([#&#8203;8097](https://github.com/astral-sh/ruff/pull/8097)) - Update fix for `mutable-argument-defaults` (`B006`) to be unsafe ([#&#8203;8108](https://github.com/astral-sh/ruff/pull/8108)) ##### Formatter - Change `line-ending` default to `auto` ([#&#8203;8057](https://github.com/astral-sh/ruff/pull/8057)) - Respect parenthesized generators in `has_own_parentheses` ([#&#8203;8100](https://github.com/astral-sh/ruff/pull/8100)) - Add caching to formatter ([#&#8203;8089](https://github.com/astral-sh/ruff/pull/8089)) - Remove `--line-length` option from `format` command ([#&#8203;8131](https://github.com/astral-sh/ruff/pull/8131)) - Add formatter to `line-length` documentation ([#&#8203;8150](https://github.com/astral-sh/ruff/pull/8150)) - Warn about incompatible formatter options ([#&#8203;8088](https://github.com/astral-sh/ruff/pull/8088)) - Fix range of unparenthesized tuple subject in match statement ([#&#8203;8101](https://github.com/astral-sh/ruff/pull/8101)) - Remove experimental formatter warning ([#&#8203;8148](https://github.com/astral-sh/ruff/pull/8148)) - Don't move type param opening parenthesis comment ([#&#8203;8163](https://github.com/astral-sh/ruff/pull/8163)) - Update versions in format benchmark script ([#&#8203;8110](https://github.com/astral-sh/ruff/pull/8110)) - Avoid loading files for cached format results ([#&#8203;8134](https://github.com/astral-sh/ruff/pull/8134)) ##### CLI - Show the `ruff format` command in help menus ([#&#8203;8167](https://github.com/astral-sh/ruff/pull/8167)) - Add `ruff version` command with long version display ([#&#8203;8034](https://github.com/astral-sh/ruff/pull/8034)) ##### Configuration - New `pycodestyle.max-line-length` option ([#&#8203;8039](https://github.com/astral-sh/ruff/pull/8039)) ##### Bug fixes - Detect `sys.version_info` slices in `outdated-version-block` ([#&#8203;8112](https://github.com/astral-sh/ruff/pull/8112)) - Avoid if-else simplification for `TYPE_CHECKING` blocks ([#&#8203;8072](https://github.com/astral-sh/ruff/pull/8072)) - Avoid false-positive print separator diagnostic with starred argument ([#&#8203;8079](https://github.com/astral-sh/ruff/pull/8079)) ##### Documentation - Fix message for `too-many-arguments` lint ([#&#8203;8092](https://github.com/astral-sh/ruff/pull/8092)) - Fix `extend-unsafe-fixes` and `extend-safe-fixes` example ([#&#8203;8139](https://github.com/astral-sh/ruff/pull/8139)) - Add links to `flake8-import-conventions` options ([#&#8203;8115](https://github.com/astral-sh/ruff/pull/8115)) - Rework the documentation to incorporate the Ruff formatter ([#&#8203;7732](https://github.com/astral-sh/ruff/pull/7732)) - Fix `Options` JSON schema description ([#&#8203;8081](https://github.com/astral-sh/ruff/pull/8081)) - Fix typo (`pytext` -> `pytest`) ([#&#8203;8117](https://github.com/astral-sh/ruff/pull/8117)) - Improve `magic-value-comparison` example in docs ([#&#8203;8111](https://github.com/astral-sh/ruff/pull/8111)) ### [`v0.1.1`](https://github.com/astral-sh/ruff/blob/HEAD/CHANGELOG.md#0110) [Compare Source](https://github.com/astral-sh/ruff/compare/v0.1.0...v0.1.1) ##### Preview features - Improve `dummy_implementations` preview style formatting ([#&#8203;9240](https://github.com/astral-sh/ruff/pull/9240)) - Normalise Hex and unicode escape sequences in strings ([#&#8203;9280](https://github.com/astral-sh/ruff/pull/9280)) - Parenthesize long type annotations in annotated assignments ([#&#8203;9210](https://github.com/astral-sh/ruff/pull/9210)) - Parenthesize multi-context managers in `with` statements ([#&#8203;9222](https://github.com/astral-sh/ruff/pull/9222)) - \[`flake8-pyi`] Implement `generator-return-from-iter-method` (`PYI058`) ([#&#8203;9313](https://github.com/astral-sh/ruff/pull/9313)) - \[`pylint`] Implement `empty-comment` (`PLR2044`) ([#&#8203;9174](https://github.com/astral-sh/ruff/pull/9174)) - \[`refurb`] Implement `bit-count` (`FURB161`) ([#&#8203;9265](https://github.com/astral-sh/ruff/pull/9265)) - \[`ruff`] Add `never-union` rule to detect redundant `typing.NoReturn` and `typing.Never` ([#&#8203;9217](https://github.com/astral-sh/ruff/pull/9217)) ##### CLI - Add paths to TOML parse errors ([#&#8203;9358](https://github.com/astral-sh/ruff/pull/9358)) - Add row and column numbers to formatter parse errors ([#&#8203;9321](https://github.com/astral-sh/ruff/pull/9321)) - Improve responsiveness when invoked via Python ([#&#8203;9315](https://github.com/astral-sh/ruff/pull/9315)) - Short rule messages should not end with a period ([#&#8203;9345](https://github.com/astral-sh/ruff/pull/9345)) ##### Configuration - Respect runtime-required decorators on functions ([#&#8203;9317](https://github.com/astral-sh/ruff/pull/9317)) ##### Bug fixes - Avoid `asyncio-dangling-task` for nonlocal and global bindings ([#&#8203;9263](https://github.com/astral-sh/ruff/pull/9263)) - Escape trailing placeholders in rule documentation ([#&#8203;9301](https://github.com/astral-sh/ruff/pull/9301)) - Fix continuation detection following multi-line strings ([#&#8203;9332](https://github.com/astral-sh/ruff/pull/9332)) - Fix scoping for generators in named expressions in classes ([#&#8203;9248](https://github.com/astral-sh/ruff/pull/9248)) - Port from obsolete wsl crate to is-wsl ([#&#8203;9356](https://github.com/astral-sh/ruff/pull/9356)) - Remove special pre-visit for module docstrings ([#&#8203;9261](https://github.com/astral-sh/ruff/pull/9261)) - Respect `__str__` definitions from super classes ([#&#8203;9338](https://github.com/astral-sh/ruff/pull/9338)) - Respect `unused-noqa` via `per-file-ignores` ([#&#8203;9300](https://github.com/astral-sh/ruff/pull/9300)) - Respect attribute chains when resolving builtin call paths ([#&#8203;9309](https://github.com/astral-sh/ruff/pull/9309)) - Treat all `typing_extensions` members as typing aliases ([#&#8203;9335](https://github.com/astral-sh/ruff/pull/9335)) - Use `Display` for formatter parse errors ([#&#8203;9316](https://github.com/astral-sh/ruff/pull/9316)) - Wrap subscripted dicts in parens for f-string conversion ([#&#8203;9238](https://github.com/astral-sh/ruff/pull/9238)) - \[`flake8-annotations`] Avoid adding return types to stub methods ([#&#8203;9277](https://github.com/astral-sh/ruff/pull/9277)) - \[`flake8-annotations`] Respect mixed `return` and `raise` cases in return-type analysis ([#&#8203;9310](https://github.com/astral-sh/ruff/pull/9310)) - \[`flake8-bandit`] Don't report violations when `SafeLoader` is imported from `yaml.loader` (`S506`) ([#&#8203;9299](https://github.com/astral-sh/ruff/pull/9299)) - \[`pylint`] Avoid panic when comment is preceded by Unicode ([#&#8203;9331](https://github.com/astral-sh/ruff/pull/9331)) - \[`pylint`] Change `PLR0917` error message to match other `PLR09XX` messages ([#&#8203;9308](https://github.com/astral-sh/ruff/pull/9308)) - \[`refurb`] Avoid false positives for `math-constant` (`FURB152`) ([#&#8203;9290](https://github.com/astral-sh/ruff/pull/9290)) ##### Documentation - Expand target name for better rule documentation ([#&#8203;9302](https://github.com/astral-sh/ruff/pull/9302)) - Fix typos found by codespell ([#&#8203;9346](https://github.com/astral-sh/ruff/pull/9346)) - \[`perflint`] Document `PERF102` fix un-safety ([#&#8203;9351](https://github.com/astral-sh/ruff/pull/9351)) - \[`pyupgrade`] Document `UP007` fix un-safety ([#&#8203;9306](https://github.com/astral-sh/ruff/pull/9306)) ### [`v0.1.0`](https://github.com/astral-sh/ruff/blob/HEAD/CHANGELOG.md#010) [Compare Source](https://github.com/astral-sh/ruff/compare/v0.0.292...v0.1.0) This is the first release which uses the `CHANGELOG` file. See [GitHub Releases](https://github.com/astral-sh/ruff/releases) for prior changelog entries. Read Ruff's new [versioning policy](https://docs.astral.sh/ruff/versioning/). ##### Breaking changes - Unsafe fixes are no longer displayed or applied without opt-in ([#&#8203;7769](https://github.com/astral-sh/ruff/pull/7769)) - Drop formatting specific rules from the default set ([#&#8203;7900](https://github.com/astral-sh/ruff/pull/7900)) - The deprecated `format` setting has been removed ([#&#8203;7984](https://github.com/astral-sh/ruff/pull/7984)) - The `format` setting cannot be used to configure the output format, use `output-format` instead - The `RUFF_FORMAT` environment variable is ignored, use `RUFF_OUTPUT_FORMAT` instead - The `--format` option has been removed from `ruff check`, use `--output-format` instead ##### Rule changes - Extend `reimplemented-starmap` (`FURB140`) to catch calls with a single and starred argument ([#&#8203;7768](https://github.com/astral-sh/ruff/pull/7768)) - Improve cases covered by `RUF015` ([#&#8203;7848](https://github.com/astral-sh/ruff/pull/7848)) - Update `SIM15` to allow `open` followed by `close` ([#&#8203;7916](https://github.com/astral-sh/ruff/pull/7916)) - Respect `msgspec.Struct` default-copy semantics in `RUF012` ([#&#8203;7786](https://github.com/astral-sh/ruff/pull/7786)) - Add `sqlalchemy` methods to \`flake8-boolean-trap\`\` exclusion list ([#&#8203;7874](https://github.com/astral-sh/ruff/pull/7874)) - Add fix for `PLR1714` ([#&#8203;7910](https://github.com/astral-sh/ruff/pull/7910)) - Add fix for `PIE804` ([#&#8203;7884](https://github.com/astral-sh/ruff/pull/7884)) - Add fix for `PLC0208` ([#&#8203;7887](https://github.com/astral-sh/ruff/pull/7887)) - Add fix for `PYI055` ([#&#8203;7886](https://github.com/astral-sh/ruff/pull/7886)) - Update `non-pep695-type-alias` to require `--unsafe-fixes` outside of stub files ([#&#8203;7836](https://github.com/astral-sh/ruff/pull/7836)) - Improve fix message for `UP018` ([#&#8203;7913](https://github.com/astral-sh/ruff/pull/7913)) - Update `PLW3201` to support `Enum` [sunder names](https://docs.python.org/3/library/enum.html#supported-sunder-names) ([#&#8203;7987](https://github.com/astral-sh/ruff/pull/7987)) ##### Preview features - Only show warnings for empty preview selectors when enabling rules ([#&#8203;7842](https://github.com/astral-sh/ruff/pull/7842)) - Add `unnecessary-key-check` to simplify `key in dct and dct[key]` to `dct.get(key)` ([#&#8203;7895](https://github.com/astral-sh/ruff/pull/7895)) - Add `assignment-in-assert` to prevent walrus expressions in assert statements ([#&#8203;7856](https://github.com/astral-sh/ruff/pull/7856)) - \[`refurb`] Add `single-item-membership-test` (`FURB171`) ([#&#8203;7815](https://github.com/astral-sh/ruff/pull/7815)) - \[`pylint`] Add `and-or-ternary` (`R1706`) ([#&#8203;7811](https://github.com/astral-sh/ruff/pull/7811)) *New rules are added in [preview](https://docs.astral.sh/ruff/preview/).* ##### Configuration - Add `unsafe-fixes` setting ([#&#8203;7769](https://github.com/astral-sh/ruff/pull/7769)) - Add `extend-safe-fixes` and `extend-unsafe-fixes` for promoting and demoting fixes ([#&#8203;7841](https://github.com/astral-sh/ruff/pull/7841)) ##### CLI - Added `--unsafe-fixes` option for opt-in to display and apply unsafe fixes ([#&#8203;7769](https://github.com/astral-sh/ruff/pull/7769)) - Fix use of deprecated `--format` option in warning ([#&#8203;7837](https://github.com/astral-sh/ruff/pull/7837)) - Show changed files when running under `--check` ([#&#8203;7788](https://github.com/astral-sh/ruff/pull/7788)) - Write summary messages to stderr when fixing via stdin instead of omitting them ([#&#8203;7838](https://github.com/astral-sh/ruff/pull/7838)) - Update fix summary message in `check --diff` to include unsafe fix hints ([#&#8203;7790](https://github.com/astral-sh/ruff/pull/7790)) - Add notebook `cell` field to JSON output format ([#&#8203;7664](https://github.com/astral-sh/ruff/pull/7664)) - Rename applicability levels to `Safe`, `Unsafe`, and `Display` ([#&#8203;7843](https://github.com/astral-sh/ruff/pull/7843)) ##### Bug fixes - Fix bug where f-strings were allowed in match pattern literal ([#&#8203;7857](https://github.com/astral-sh/ruff/pull/7857)) - Fix `SIM110` with a yield in the condition ([#&#8203;7801](https://github.com/astral-sh/ruff/pull/7801)) - Preserve trailing comments in `C414` fixes ([#&#8203;7775](https://github.com/astral-sh/ruff/pull/7775)) - Check sequence type before triggering `unnecessary-enumerate` `len` suggestion ([#&#8203;7781](https://github.com/astral-sh/ruff/pull/7781)) - Use correct start location for class/function clause header ([#&#8203;7802](https://github.com/astral-sh/ruff/pull/7802)) - Fix incorrect fixes for `SIM101` ([#&#8203;7798](https://github.com/astral-sh/ruff/pull/7798)) - Format comment before parameter default correctly ([#&#8203;7870](https://github.com/astral-sh/ruff/pull/7870)) - Fix `E251` false positive inside f-strings ([#&#8203;7894](https://github.com/astral-sh/ruff/pull/7894)) - Allow bindings to be created and referenced within annotations ([#&#8203;7885](https://github.com/astral-sh/ruff/pull/7885)) - Show per-cell diffs when analyzing notebooks over `stdin` ([#&#8203;7789](https://github.com/astral-sh/ruff/pull/7789)) - Avoid curly brace escape in f-string format spec ([#&#8203;7780](https://github.com/astral-sh/ruff/pull/7780)) - Fix lexing single-quoted f-string with multi-line format spec ([#&#8203;7787](https://github.com/astral-sh/ruff/pull/7787)) - Consider nursery rules to be in-preview for `ruff rule` ([#&#8203;7812](https://github.com/astral-sh/ruff/pull/7812)) - Report precise location for invalid conversion flag ([#&#8203;7809](https://github.com/astral-sh/ruff/pull/7809)) - Visit pattern match guard as a boolean test ([#&#8203;7911](https://github.com/astral-sh/ruff/pull/7911)) - Respect `--unfixable` in `ISC` rules ([#&#8203;7917](https://github.com/astral-sh/ruff/pull/7917)) - Fix edge case with `PIE804` ([#&#8203;7922](https://github.com/astral-sh/ruff/pull/7922)) - Show custom message in `PTH118` for `Path.joinpath` with starred arguments ([#&#8203;7852](https://github.com/astral-sh/ruff/pull/7852)) - Fix false negative in `outdated-version-block` when using greater than comparisons ([#&#8203;7920](https://github.com/astral-sh/ruff/pull/7920)) - Avoid converting f-strings within Django `gettext` calls ([#&#8203;7898](https://github.com/astral-sh/ruff/pull/7898)) - Fix false positive in `PLR6301` ([#&#8203;7933](https://github.com/astral-sh/ruff/pull/7933)) - Treat type aliases as typing-only expressions e.g. resolves false positive in `TCH004` ([#&#8203;7968](https://github.com/astral-sh/ruff/pull/7968)) - Resolve `cache-dir` relative to project root ([#&#8203;7962](https://github.com/astral-sh/ruff/pull/7962)) - Respect subscripted base classes in type-checking rules e.g. resolves false positive in `TCH003` ([#&#8203;7954](https://github.com/astral-sh/ruff/pull/7954)) - Fix JSON schema limit for `line-length` ([#&#8203;7883](https://github.com/astral-sh/ruff/pull/7883)) - Fix commented-out `coalesce` keyword ([#&#8203;7876](https://github.com/astral-sh/ruff/pull/7876)) ##### Documentation - Document `reimplemented-starmap` performance effects ([#&#8203;7846](https://github.com/astral-sh/ruff/pull/7846)) - Default to following the system dark/light mode ([#&#8203;7888](https://github.com/astral-sh/ruff/pull/7888)) - Add documentation for fixes ([#&#8203;7901](https://github.com/astral-sh/ruff/pull/7901)) - Fix typo in docs of `PLR6301` ([#&#8203;7831](https://github.com/astral-sh/ruff/pull/7831)) - Update `UP038` docs to note that it results in slower code ([#&#8203;7872](https://github.com/astral-sh/ruff/pull/7872)) - crlf -> cr-lf ([#&#8203;7766](https://github.com/astral-sh/ruff/pull/7766)) - Add an example of an unsafe fix ([#&#8203;7924](https://github.com/astral-sh/ruff/pull/7924)) - Fix documented examples for `unnecessary-subscript-reversal` ([#&#8203;7774](https://github.com/astral-sh/ruff/pull/7774)) - Correct error in tuple example in ruff formatter docs ([#&#8203;7822](https://github.com/astral-sh/ruff/pull/7822)) - Add versioning policy to documentation ([#&#8203;7923](https://github.com/astral-sh/ruff/pull/7923)) - Fix invalid code in `FURB177` example ([#&#8203;7832](https://github.com/astral-sh/ruff/pull/7832)) ##### Formatter - Less scary `ruff format` message ([#&#8203;7867](https://github.com/astral-sh/ruff/pull/7867)) - Remove spaces from import statements ([#&#8203;7859](https://github.com/astral-sh/ruff/pull/7859)) - Formatter quoting for f-strings with triple quotes ([#&#8203;7826](https://github.com/astral-sh/ruff/pull/7826)) - Update `ruff_python_formatter` generate.py comment ([#&#8203;7850](https://github.com/astral-sh/ruff/pull/7850)) - Document one-call chaining deviation ([#&#8203;7767](https://github.com/astral-sh/ruff/pull/7767)) - Allow f-string modifications in line-shrinking cases ([#&#8203;7818](https://github.com/astral-sh/ruff/pull/7818)) - Add trailing comment deviation to README ([#&#8203;7827](https://github.com/astral-sh/ruff/pull/7827)) - Add trailing zero between dot and exponential ([#&#8203;7956](https://github.com/astral-sh/ruff/pull/7956)) - Force parentheses for power operations in unary expressions ([#&#8203;7955](https://github.com/astral-sh/ruff/pull/7955)) ##### Playground - Fix playground `Quick Fix` action ([#&#8203;7824](https://github.com/astral-sh/ruff/pull/7824)) ### [`v0.0.292`](https://github.com/astral-sh/ruff/releases/tag/v0.0.292) [Compare Source](https://github.com/astral-sh/ruff/compare/v0.0.291...v0.0.292) <!-- Release notes generated using configuration in .github/release.yml at v0.0.292 --> #### What's Changed ##### Highlights **This release includes full support for Python 3.12 ([out now!](https://www.python.org/downloads/release/python-3120/)), including the new type parameter ([PEP 695](https://peps.python.org/pep-0695/)) and f-string syntaxes ([PEP 701](https://peps.python.org/pep-0701/)).** PEP 701 lifts many of the restrictions on f-strings that existed in the past, allowing for arbitrarily nested f-strings, consistent quote style within f-strings, and more, all of which are now supported by Ruff (thanks to [@&#8203;dhruvmanila](https://github.com/dhruvmanila) in https://github.com/astral-sh/ruff/pull/7376). ##### Breaking Changes - In the formatter, `format.quote-style` no longer affects triple-quoted strings, to align with common conventions as well as the guidance from PEP 8 and PEP 257 (see: https://github.com/astral-sh/ruff/pull/7680). - `line-too-long` (`E501`) now ignores trailing pragma comments (like `# type: ignore` and `# noqa`) when computing line length (see: https://github.com/astral-sh/ruff/pull/7692). This is similar to flake8-bugbear's methodology for detecting overlong lines, and ensures that adding pragmas like `# noqa` does not introduce further lint errors. ##### Rules - \[`refurb`] Implement `print-empty-string` (`FURB105`) by [@&#8203;tjkuson](https://github.com/tjkuson) in https://github.com/astral-sh/ruff/pull/7617 - \[`flake8-bandit`] Implement `weak-cryptographic-key` (`S505`) by [@&#8203;mkniewallner](https://github.com/mkniewallner) in https://github.com/astral-sh/ruff/pull/7703 - \[`refurb`] Implement `implicit-cwd` (`FURB177`) by [@&#8203;danparizher](https://github.com/danparizher) in https://github.com/astral-sh/ruff/pull/7704 - `unnecessary-pass` (`PIE790`) now flags all unnecessary `pass` statements; previously, the rule only flagged `pass` statements that followed a docstring in a two-statement body (see: https://github.com/astral-sh/ruff/pull/7697). ##### Settings - Add `lint` section to Ruff configuration by [@&#8203;MichaReiser](https://github.com/MichaReiser) in https://github.com/astral-sh/ruff/pull/7549 - Add `explicit-preview-rules` to toggle explicit selection of preview rules by [@&#8203;zanieb](https://github.com/zanieb) in https://github.com/astral-sh/ruff/pull/7390 - Decrease PEP 593 error to a debug warning by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7745 - Write full Jupyter notebook to `stdout` by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7748 - Extend `unnecessary-pass` (`PIE790`) to trigger on all unnecessary `pass` statements by [@&#8203;tjkuson](https://github.com/tjkuson) in https://github.com/astral-sh/ruff/pull/7697 ##### Bug Fixes - Ignore blank lines between comments when counting newlines-after-imports by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7607 - Avoid reordering mixed-indent-level comments after branches by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7609 - Avoid flagging B009 and B010 on starred expressions by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7621 - Use deletion for D215 full-line removals by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7625 - Avoid searching for bracketed comments in unparenthesized generators by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7627 - Update return type for `PT022` autofix by [@&#8203;dhruvmanila](https://github.com/dhruvmanila) in https://github.com/astral-sh/ruff/pull/7613 - Flag FURB105 with starred kwargs by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7630 - Don't suggest replacing `builtin.open()` with `Path.open()` if the latter doesn't support all options by [@&#8203;konstin](https://github.com/konstin) in https://github.com/astral-sh/ruff/pull/7637 - Use 1-based cell indices consistently for Notebooks by [@&#8203;dhruvmanila](https://github.com/dhruvmanila) in https://github.com/astral-sh/ruff/pull/7662 - Add `Expr::Name` checks to rules which use `is_logger_candidate` by [@&#8203;qdegraaf](https://github.com/qdegraaf) in https://github.com/astral-sh/ruff/pull/7521 - Ensure that B006 autofixes are inserted after imports by [@&#8203;Hoxbro](https://github.com/Hoxbro) in https://github.com/astral-sh/ruff/pull/7629 - Allow named expressions in `__all__` assignments by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7673 - Include radix base prefix in large number representation by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7700 - Parenthesize multi-line attributes in B009 by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7701 - Insert necessary padding in B014 fixes by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7699 - fix(rules): improve S507 detection by [@&#8203;mkniewallner](https://github.com/mkniewallner) in https://github.com/astral-sh/ruff/pull/7661 - Ignore TODO tags in `commented-out-code` by [@&#8203;tjkuson](https://github.com/tjkuson) in https://github.com/astral-sh/ruff/pull/7523 - Track fix isolation in `unnecessary-pass` by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7715 - Use fixed source code for parser context by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7717 - Preserve parentheses in `quadratic-list-summation` by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7719 - Compute `NotebookIndex` for `Diagnostics` on stdin by [@&#8203;dhruvmanila](https://github.com/dhruvmanila) in https://github.com/astral-sh/ruff/pull/7663 - Perform insertions before replacements by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7739 - Skip all bracketed expressions when locating comparison ops by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7740 - Fix PLE251 rules with f-string escaping by [@&#8203;konstin](https://github.com/konstin) in https://github.com/astral-sh/ruff/pull/7741 - Skip BOM when inserting start-of-file imports by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7622 - Emit `LexError` for dedent to incorrect level by [@&#8203;MichaReiser](https://github.com/MichaReiser) in https://github.com/astral-sh/ruff/pull/7638 - Expand `DeprecatedLogWarn` to check for `Expr::Atrribute` calls by [@&#8203;qdegraaf](https://github.com/qdegraaf) in https://github.com/astral-sh/ruff/pull/7677 ##### Other Changes - Add support for PEP 701 by [@&#8203;dhruvmanila](https://github.com/dhruvmanila) in https://github.com/astral-sh/ruff/pull/7376 - Improve performance of `commented-out-code` (~50-80%) by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7706 #### New Contributors - [@&#8203;bluthej](https://github.com/bluthej) made their first contribution in https://github.com/astral-sh/ruff/pull/7665 - [@&#8203;Hoxbro](https://github.com/Hoxbro) made their first contribution in https://github.com/astral-sh/ruff/pull/7629 - [@&#8203;danparizher](https://github.com/danparizher) made their first contribution in https://github.com/astral-sh/ruff/pull/7704 - [@&#8203;aspizu](https://github.com/aspizu) made their first contribution in https://github.com/astral-sh/ruff/pull/7750 **Full Changelog**: https://github.com/astral-sh/ruff/compare/v0.0.291...v0.0.292 ### [`v0.0.291`](https://github.com/astral-sh/ruff/releases/tag/v0.0.291) [Compare Source](https://github.com/astral-sh/ruff/compare/v0.0.290...v0.0.291) <!-- Release notes generated using configuration in .github/release.yml at v0.0.291 --> #### What's Changed ##### Deprecations **The `format` command-line argument and configuration option has been renamed to `output-format`.** While Ruff will continue to respect `format` when passed as a command-line argument or configuration option, this backwards-compatible support will be dropped in a future release. See: https://github.com/astral-sh/ruff/pull/7514. ##### Rules - \[`flake8-bandit`] Implement `S201`: `flask-debug-true` by [@&#8203;mkniewallner](https://github.com/mkniewallner) in https://github.com/astral-sh/ruff/pull/7503 - \[`flake8-bandit`] Implement `S507`: `ssh_no_host_key_verification` by [@&#8203;mkniewallner](https://github.com/mkniewallner) in https://github.com/astral-sh/ruff/pull/7528 - \[`flake8-logging`] Implement `LOG002`: `invalid-get-logger-argument` by [@&#8203;dhruvmanila](https://github.com/dhruvmanila) in https://github.com/astral-sh/ruff/pull/7399 - \[`flake8-logging`] Implement `LOG007`: `exception-without-exc-info` by [@&#8203;qdegraaf](https://github.com/qdegraaf) in https://github.com/astral-sh/ruff/pull/7410 - \[`refurb`] Implement `FURB140`: `reimplemented-starmap` by [@&#8203;SavchenkoValeriy](https://github.com/SavchenkoValeriy) in https://github.com/astral-sh/ruff/pull/7253 - \[`refurb`] Implement `FURB148`: `unnecessary-enumerate` by [@&#8203;tjkuson](https://github.com/tjkuson) in https://github.com/astral-sh/ruff/pull/7454 - \[`ruff`] Detect `asyncio.get_running_loop` calls in RUF006 by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7562 ##### Settings - Show `--no-X` variants in CLI help by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7504 - Rename `format` option to `output-format` by [@&#8203;MichaReiser](https://github.com/MichaReiser) in https://github.com/astral-sh/ruff/pull/7514 - Enable tab completion for `ruff rule` by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7560 ##### Bug Fixes - Add padding to prevent some autofix errors by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7461 - Remove parentheses when rewriting assert calls to statements by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7464 - Avoid flagging starred elements in C402 by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7466 - Extend `bad-dunder-method-name` to permit `attrs` dunders by [@&#8203;tjkuson](https://github.com/tjkuson) in https://github.com/astral-sh/ruff/pull/7472 - Avoid N802 violations for [@&#8203;overload](https://github.com/overload) methods by [@&#8203;JonathanPlasse](https://github.com/JonathanPlasse) in https://github.com/astral-sh/ruff/pull/7498 - Avoid flagging starred expressions in UP007 by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7505 - Ensure that LOG007 only triggers on `.exception()` calls by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7524 - Use strict sorted and union for NoQA mapping insertion by [@&#8203;dhruvmanila](https://github.com/dhruvmanila) in https://github.com/astral-sh/ruff/pull/7531 - Avoid inserting imports directly after continuation by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7553 - Add padding in `PERF102` fixes by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7554 - Avoid invalid fix for parenthesized values in F601 by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7559 - Treat `os.error` as an `OSError` alias by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7582 - Extend `bad-dunder-method-name` to permit `__html__` by [@&#8203;jaap3](https://github.com/jaap3) in https://github.com/astral-sh/ruff/pull/7492 - Fix stylist indentation with a formfeed by [@&#8203;konstin](https://github.com/konstin) in https://github.com/astral-sh/ruff/pull/7489 #### New Contributors - [@&#8203;MicaelJarniac](https://github.com/MicaelJarniac) made their first contribution in https://github.com/astral-sh/ruff/pull/5498 - [@&#8203;maheshsaripalli9](https://github.com/maheshsaripalli9) made their first contribution in https://github.com/astral-sh/ruff/pull/7552 - [@&#8203;T-256](https://github.com/T-256) made their first contribution in https://github.com/astral-sh/ruff/pull/7585 **Full Changelog**: https://github.com/astral-sh/ruff/compare/v0.0.290...v0.0.291 ### [`v0.0.290`](https://github.com/astral-sh/ruff/releases/tag/v0.0.290) [Compare Source](https://github.com/astral-sh/ruff/compare/v0.0.289...v0.0.290) <!-- Release notes generated using configuration in .github/release.yml at v0.0.290 --> #### What's Changed ##### Rules - Update `deprecated-import` lists based on recent `typing-extensions` release by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7356 - Add support for bounds, constraints, and explicit variance on generic type variables to `UP040` by [@&#8203;nathanwhit](https://github.com/nathanwhit) in https://github.com/astral-sh/ruff/pull/6749 ##### Settings - Show rule codes in shell tab completion by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7375 ##### Bug Fixes - Parenthesize single-generator arguments when adding reverse keyword by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7365 - Invert reverse argument regardless of whether it's a boolean by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7372 - Extend `C416` to catch tuple unpacking by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7363 - Allow `NURSERY` rule selctor in JSON Schema by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7374 - Avoid flagging single-quoted docstrings with continuations for multi-line rules by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7392 - Treat whitespace-only line as blank for `D411` by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7351 ##### Preview [*What's this section?*](https://beta.ruff.rs/docs/preview/) - \[`flake8-logging`] New rule `undocumented-warn` (`LOG009`) by [@&#8203;qdegraaf](https://github.com/qdegraaf) in https://github.com/astral-sh/ruff/pull/7249 - \[`flake8-logging`] New rule `direct-logger-instantiation` (`LOG001`) by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7397 - \[`flake8-logging`] New plugin `flake8_logging` (`LOG`) by [@&#8203;qdegraaf](https://github.com/qdegraaf) in https://github.com/astral-sh/ruff/pull/7249 - \[`perflint`] Add `manual-dict-comprehsion` (`PERF403`) by [@&#8203;qdegraaf](https://github.com/qdegraaf) in https://github.com/astral-sh/ruff/pull/6132 - \[`pylint`] New rule `too-many-public-methods` (`PLR0904`) by [@&#8203;jelly](https://github.com/jelly) in https://github.com/astral-sh/ruff/pull/6179 - \[`refurb`] New rule `no-slice-copy` (`FURB145`) by [@&#8203;tjkuson](https://github.com/tjkuson) in https://github.com/astral-sh/ruff/pull/7007 - Add warnings for nursery and preview rule selection by [@&#8203;zanieb](https://github.com/zanieb) in https://github.com/astral-sh/ruff/pull/7210 - Remove the `PREVIEW` rule selector by [@&#8203;zanieb](https://github.com/zanieb) in https://github.com/astral-sh/ruff/pull/7389 - [`pre-commit` support](https://github.com/astral-sh/ruff-pre-commit#using-ruffs-formatter-unstable) for the [alpha formatter](https://github.com/astral-sh/ruff/discussions/7310) by [@&#8203;zanieb](https://github.com/zanieb) in https://github.com/astral-sh/ruff-pre-commit/pull/50 #### New Contributors - [@&#8203;nathanwhit](https://github.com/nathanwhit) made their first contribution in https://github.com/astral-sh/ruff/pull/6749 **Full Changelog**: https://github.com/astral-sh/ruff/compare/v0.0.289...v0.0.290 ### [`v0.0.289`](https://github.com/astral-sh/ruff/releases/tag/v0.0.289) [Compare Source](https://github.com/astral-sh/ruff/compare/v0.0.288...v0.0.289) <!-- Release notes generated using configuration in .github/release.yml at v0.0.289 --> #### What's Changed ##### Bug Fixes - Invert condition for < and <= in outdated version block by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7284 - Ignore `@override` method when enforcing `bad-dunder-name` rule by [@&#8203;brendonh8](https://github.com/brendonh8) in https://github.com/astral-sh/ruff/pull/7224 - Add `NotebookIndex` to the cache by [@&#8203;dhruvmanila](https://github.com/dhruvmanila) in https://github.com/astral-sh/ruff/pull/6863 ##### Preview This release includes a new preview mode which can be used to opt-in to unstable rules and features. - Update rule selection to respect preview mode by [@&#8203;zanieb](https://github.com/zanieb) in https://github.com/astral-sh/ruff/pull/7195 - Display the `--preview` option in the CLI help menu by [@&#8203;zanieb](https://github.com/zanieb) in https://github.com/astral-sh/ruff/pull/7274 See the [documentation](https://beta.ruff.rs/docs/preview/) and [versioning discussion](https://github.com/astral-sh/ruff/discussions/6998) for more details. #### New Contributors - [@&#8203;brendonh8](https://github.com/brendonh8) made their first contribution in https://github.com/astral-sh/ruff/pull/7224 **Full Changelog**: https://github.com/astral-sh/ruff/compare/v0.0.288...v0.0.289 ### [`v0.0.288`](https://github.com/astral-sh/ruff/releases/tag/v0.0.288) [Compare Source](https://github.com/astral-sh/ruff/compare/v0.0.287...v0.0.288) #### What's Changed ##### Breaking Changes - Remove emoji identifier support by [@&#8203;MichaReiser](https://github.com/MichaReiser) in https://github.com/astral-sh/ruff/pull/7212 - Location agnostic GitLab fingerprints by [@&#8203;gregersn](https://github.com/gregersn) in https://github.com/astral-sh/ruff/pull/7203 ##### Rules - \[`ruff`] - `RUF001`: Remove autofix for ambiguous unicode rule by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7168 ##### Settings - \[`flake8-self`] - `SLF001`: Add `extend-ignore-names` option by [@&#8203;jaap3](https://github.com/jaap3) in https://github.com/astral-sh/ruff/pull/7194 ##### Bug Fixes - \[`flake8-bugbear`] - `B006`: Add newline if fix is at end-of-file by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7090 - `B006`: Fix function docstring followed by whitespace but no newline by [@&#8203;zanieb](https://github.com/zanieb) in https://github.com/astral-sh/ruff/pull/7160 - `B009`: Parenthesize expressions when converting to attribute access by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7091 - `B009`, `B010`: Fix `getattr` calls on `int` literals by [@&#8203;density](https://github.com/density) in https://github.com/astral-sh/ruff/pull/7057 - `B013`: Supported starred exceptions in length-one tuple detection by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7080 - `B013`: Insert required space when fixing by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7148 - \[`flake8-comprehensions`] - `C402`: Add required space when fixing by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7152 - `C404` Add required space when fixing by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7185 - `C416` Add required space to fix by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7204 - `C417`: Support length-2 lists in dictionary comprehension rewrites by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7081 - `C417`: Parenthesize targets if necessary by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7189 - \[`flake8-return`] - `RET504`: Add space after return when inlining number by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7116 - \[`flake8-simplify`] - `SIM105`: Avoid attempting to fix violations with multi-statement lines by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7191 - `SIM105` Avoid inserting an extra newline for fixes by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7221 - `SIM118`: Add required space when fixing by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7150 - `SIM118`: delete `.keys()` rather than replace expression by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7223 - `SIM210`: Retain parentheses when fixing by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7118 - `SIM222`: Add parentheses when simplifying conditions by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7117 - `SIM300`: Add required space when fixing by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7167 - \[`flake8-pytest-style`] - `PT018`: Split within `not`, rather than outside of `not` by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7151 - \[`flynt`] - `FLY002`: Add required space for fixes by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7222 - \[`numpy`] - `NPY001`: Avoid attempting to fix with overridden builtins by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7187 - `NPY003`: Use symbol import for replacement by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7083 - \[`pandas-vet`] - `PD002`: Handle parenthesized calls by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7111 - \[`pep8-naming`] - `N806`: Avoid triggering on `TypeAlias` assignments by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7119 - \[`pydocstyle`] - `D204`: Fix when there's a semicolon after a docstring by [@&#8203;konstin](https://github.com/konstin) in https://github.com/astral-sh/ruff/pull/7174 - `D213`, `D400`: Ignore single quote docstrings with newline escape by [@&#8203;konstin](https://github.com/konstin) in https://github.com/astral-sh/ruff/pull/7173 - `D417`: Fix error with function docstrings with dashed lines by [@&#8203;eronnen](https://github.com/eronnen) in https://github.com/astral-sh/ruff/pull/7251 - \[`pyflakes`] - `F401`: Avoid panic with noqa import name by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7260 - `F841`: Expand fixes to handle parenthesized targets by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7110 - \[`pylint`] - `PLW3301`: Copy the starred argument as is for autofix by [@&#8203;dhruvmanila](https://github.com/dhruvmanila) in https://github.com/astral-sh/ruff/pull/7177 - \[`pyupgrade`] - `UP006` and `UP007`: Add required space to fixes by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7202 - `UP007`: Avoid attempting to fix invalid `Optional` annotations by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7079 - `UP007`: Fix syntax error in autofix by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7137 - `UP021`: Avoid adding duplicate `text` keyword to `subprocess.run` by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7112 - `UP022`: Avoid adding duplicate `capture_output` keyword to `subprocess.run` by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7113 - `UP028`: Support parenthesized expressions by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7114 - `UP022`: Avoid fixing when `capture_output` is provided by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7149 - `UP024`: Add required space when fixing by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7171 - \[`ruff`] - `RUF017`: Avoid duplicate fixes for multi-import imports by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7063 - Fix named expression precedence in generator by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7170 - Fix precedence of annotated assignments in generator by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7115 - Update identifier Unicode character validation to match Python spec by [@&#8203;LaBatata101](https://github.com/LaBatata101) in https://github.com/astral-sh/ruff/pull/7209 ##### Other Changes - Added argfile test and documentation by [@&#8203;njgrisafi](https://github.com/njgrisafi) in https://github.com/astral-sh/ruff/pull/7138 #### New Contributors - [@&#8203;oliviacrain](https://github.com/oliviacrain) made their first contribution in https://github.com/astral-sh/ruff/pull/7093 - [@&#8203;dalgarno](https://github.com/dalgarno) made their first contribution in https://github.com/astral-sh/ruff/pull/7108 - [@&#8203;manmartgarc](https://github.com/manmartgarc) made their first contribution in https://github.com/astral-sh/ruff/pull/7179 - [@&#8203;jaap3](https://github.com/jaap3) made their first contribution in https://github.com/astral-sh/ruff/pull/7194 - [@&#8203;gregersn](https://github.com/gregersn) made their first contribution in https://github.com/astral-sh/ruff/pull/7203 - [@&#8203;eronnen](https://github.com/eronnen) made their first contribution in https://github.com/astral-sh/ruff/pull/7251 **Full Changelog**: https://github.com/astral-sh/ruff/compare/v0.0.287...v0.0.288 ### [`v0.0.287`](https://github.com/astral-sh/ruff/releases/tag/v0.0.287) [Compare Source](https://github.com/astral-sh/ruff/compare/v0.0.286...v0.0.287) <!-- Release notes generated using configuration in .github/release.yml at v0.0.287 --> #### What's Changed ##### Rules - \[refurb] Implement preview `repeated-append` rule (`FURB113`) by [@&#8203;SavchenkoValeriy](https://github.com/SavchenkoValeriy) in https://github.com/astral-sh/ruff/pull/6702 - \[refurb] Implement preview `delete-full-slice` rule (`FURB131`) by [@&#8203;SavchenkoValeriy](https://github.com/SavchenkoValeriy) in https://github.com/astral-sh/ruff/pull/6897 - \[refurb] Implement preview `check-and-remove-from-set` rule (`FURB132`) by [@&#8203;SavchenkoValeriy](https://github.com/SavchenkoValeriy) in https://github.com/astral-sh/ruff/pull/6904 ##### Bug Fixes - Expand `PERF401` and `PERF402` with type checks by [@&#8203;qdegraaf](https://github.com/qdegraaf) in https://github.com/astral-sh/ruff/pull/6994 - Insert space to avoid syntax error in RSE fixes by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6886 - Avoid PEP 604 upgrades that lead to invalid syntax by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6888 - Fix ranges for global usages by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6917 - Avoid invalid fix for C417 with separate keys and values by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6954 - Avoid panic when `typename` is provided as a keyword argument by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6955 - Improve compatibility between multi-statement PYI rules by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/7024 - Fixed panic in `missing_copyright_notice` by [@&#8203;WindowGenerator](https://github.com/WindowGenerator) in https://github.com/astral-sh/ruff/pull/7029 - Avoid lexer infinite loop on invalid input by [@&#8203;dhruvmanila](https://github.com/dhruvmanila) in https://github.com/astral-sh/ruff/pull/6937 - Fix `WithItem` ranges for parenthesized, non-`as` items by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6782 #### New Contributors - [@&#8203;SavchenkoValeriy](https://github.com/SavchenkoValeriy) made their first contribution in https://github.com/astral-sh/ruff/pull/6702 - [@&#8203;Anselmoo](https://github.com/Anselmoo) made their first contribution in https://github.com/astral-sh/ruff/pull/6986 - [@&#8203;njgrisafi](https://github.com/njgrisafi) made their first contribution in https://github.com/astral-sh/ruff/pull/7032 - [@&#8203;WindowGenerator](https://github.com/WindowGenerator) made their first contribution in https://github.com/astral-sh/ruff/pull/7029 **Full Changelog**: https://github.com/astral-sh/ruff/compare/v0.0.286...v0.0.287 ### [`v0.0.286`](https://github.com/astral-sh/ruff/releases/tag/v0.0.286) [Compare Source](https://github.com/astral-sh/ruff/compare/v0.0.285...v0.0.286) <!-- Release notes generated using configuration in .github/release.yml at v0.0.286 --> #### What's Changed ##### New Rules - \[`flake8-bugbear`] Update `function-call-in-argument-default` (`B008`) to ignore arguments with immutable annotations by [@&#8203;zanieb](https://github.com/zanieb) in https://github.com/astral-sh/ruff/pull/6784 - \[`flake8-bugbear`] Update `mutable-argument-default` (`B006`) to use `extend-immutable-calls` when determining if annotations are immutable by [@&#8203;zanieb](https://github.com/zanieb) in https://github.com/astral-sh/ruff/pull/6781 - \[`flake8-pie`] Implement `unnecessary-range-start` (`PIE808`) by [@&#8203;harupy](https://github.com/harupy) in https://github.com/astral-sh/ruff/pull/6690 - \[`flake8-pytest-style`] Add autofix for `PT014` by [@&#8203;harupy](https://github.com/harupy) in https://github.com/astral-sh/ruff/pull/6698 - \[`pylint`] Implement `no-self-use` (`R6301`) by [@&#8203;LaBatata101](https://github.com/LaBatata101) in https://github.com/astral-sh/ruff/pull/6574 - \[`pylint`] Extend `repeated-equality-comparison-target` to check for mixed orderings and Yoda conditions. by [@&#8203;tjkuson](https://github.com/tjkuson) in https://github.com/astral-sh/ruff/pull/6691 ##### Settings - Make isort's `detect-same-package` behavior configurable by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6833 ##### Bug Fixes - Apply RUF017 when start is passed via position by [@&#8203;hauntsaninja](https://github.com/hauntsaninja) in https://github.com/astral-sh/ruff/pull/6664 - Use `typing_extensions.TypeAlias` for PYI026 fixes on pre-3.10 by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6696 - Ignore multi-comparisons in `repeated-equality-comparison-target` by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6705 - Accept empty inner calls in C414 by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6725 - Allow next in FBT exclusions by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6729 - Allow `ctypes.WinError()` in flake8-raise by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6731 - Ignore star imports when importing symbols in fixes by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6743 - Support C419 autofixes for set comprehensions by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6744 - Avoid attempting to fix unconventional submodule imports by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6745 - Don't trigger `eq-without-hash` when `__hash__` is explicitly set to `None` by [@&#8203;LaBatata101](https://github.com/LaBatata101) in https://github.com/astral-sh/ruff/pull/6739 - Avoid E231 if comma is at end-of-line by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6747 - Truncate some messages in diagnostics by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6748 - Fix isolation groups for unused imports by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6774 - Avoid fixing D200 for docstrings that end in escapes by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6779 - Parenthesize expressions prior to LibCST parsing by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6742 - Fallback to end-of-file if ends in trailing continuation by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6789 - Confine repeated-equality-comparison-target to names and attributes by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6802 - Fix `native-literals` handling of int literal with attribute access by [@&#8203;zanieb](https://github.com/zanieb) in https://github.com/astral-sh/ruff/pull/6792 - Fix `uncessary-coding-comment` fix when there's leading content by [@&#8203;zanieb](https://github.com/zanieb) in https://github.com/astral-sh/ruff/pull/6775 - Avoid attempting to fix PT018 in multi-statement lines by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6829 - Update ERA100 to apply to commented dictionary items with trailing comments by [@&#8203;zanieb](https://github.com/zanieb) in https://github.com/astral-sh/ruff/pull/6822 - Avoid parsing other parts of a format specification if replacements are present by [@&#8203;zanieb](https://github.com/zanieb) in https://github.com/astral-sh/ruff/pull/6858 - Avoid panic in unused arguments rule for parameter-free lambda by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6679 - Avoid `C417` for `lambda` with default and variadic parameters by [@&#8203;dhruvmanila](https://github.com/dhruvmanila) in https://github.com/astral-sh/ruff/pull/6752 - Add `networkx` to conventional aliases by [@&#8203;zanieb](https://github.com/zanieb) in https://github.com/astral-sh/ruff/pull/6778 - Skip serializing cell ID if it's None by [@&#8203;harupy](https://github.com/harupy) in https://github.com/astral-sh/ruff/pull/6851 - fix is_raw_string for multiple prefixes by [@&#8203;davidszotten](https://github.com/davidszotten) in https://github.com/astral-sh/ruff/pull/6865 - Add jupyter notebook cell ids in 4.5+ if missing by [@&#8203;konstin](https://github.com/konstin) in https://github.com/astral-sh/ruff/pull/6853 **Full Changelog**: https://github.com/astral-sh/ruff/compare/v0.0.285...v0.0.286 ### [`v0.0.285`](https://github.com/astral-sh/ruff/releases/tag/v0.0.285) [Compare Source](https://github.com/astral-sh/ruff/compare/v0.0.284...v0.0.285) #### What's Changed ##### New rules - \[`flake8-pytest-style`] Implement `pytest-unittest-raises-assertion` (`PT027`) by [@&#8203;harupy](https://github.com/harupy) in https://github.com/astral-sh/ruff/pull/6554 - \[`flake8-pytest-style`] Implement `pytest-duplicate-parametrize-test-cases` (`PT014`) by [@&#8203;harupy](https://github.com/harupy) in https://github.com/astral-sh/ruff/pull/6598 - \[`flake8-tidy-imports`] Implement `banned-module-level-imports` (`TID253`) by [@&#8203;durumu](https://github.com/durumu) in https://github.com/astral-sh/ruff/pull/6378 - \[`pylint`] Implement `bad-dunder-name` (`W3201`) (in the Ruff nursery) by [@&#8203;LaBatata101](https://github.com/LaBatata101) in https://github.com/astral-sh/ruff/pull/6486 - \[`pylint`] Implement `subprocess-run-check` (`W1510`) by [@&#8203;tjkuson](https://github.com/tjkuson) in https://github.com/astral-sh/ruff/pull/6487 - \[`ruff`] Implement `quadratic-list-summation` (`RUF017`) by [@&#8203;evanrittenhouse](https://github.com/evanrittenhouse) in https://github.com/astral-sh/ruff/pull/6489 ##### Rule changes - \[`flake8-bugbear`] Add autofix for `B006` by [@&#8203;qdegraaf](https://github.com/qdegraaf) in https://github.com/astral-sh/ruff/pull/6131 - \[`flake8-pyi`] Avoid applying `PYI055` to runtime-evaluated annotations by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6457 - \[`flake8-self`] Allow `os._exit` accesses in `SLF001` by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6490 - \[`perflint`] Ignore `PERF203` if `try` contains loop control flow statements by [@&#8203;evanrittenhouse](https://github.com/evanrittenhouse) in https://github.com/astral-sh/ruff/pull/6536 - \[`pylint`] Check for invalid format type specifiers in nested replacements for `PLE1300` by [@&#8203;zanieb](https://github.com/zanieb) in https://github.com/astral-sh/ruff/pull/6616 - \[`tryceratops`] Omit `NotImplementedError` from `TRY003` by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6568 ##### Settings - Respect `.ipynb` and `.pyi` sources when linting from stdin by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6628 - Support glob patterns for `raises_require_match_for` and `raises_require_match_for` by [@&#8203;harupy](https://github.com/harupy) in https://github.com/astral-sh/ruff/pull/6635 ##### Bug Fixes - Make `lambda-assignment` fix always-manual in class bodies by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6626 - Fix counting of message arguments when msg is provided as a keyword by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6456 - Add container types to `E721` by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6469 - Respect scoping rules when identifying builtins by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6468 - Respect tab width in line-length heuristic by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6491 - Respect dummy-variable-rgx for unused bound exceptions by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6492 - Fix detection of top-level imports with newlines in `E402` by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6526 - Allow if-expression with dual string arms in `invalid-envvar-value` by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6538 - Add deprecated unittest assertions to PT009 by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6572 - Avoid unused argument rules when functions call `locals()` by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6578 - Allow top-level `await` in Jupyter notebooks by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6607 - Don't detect `pandas#values` for stores, deletes, or class accesses by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6631 - Avoid removing parentheses in `E712` fix by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6575 - Skip whitespace between comments at start of file e.g. for `I002` by [@&#8203;durumu](https://github.com/durumu) in https://github.com/astral-sh/ruff/pull/6523 - Add support for nested replacements inside format specifications e.g. for `PLE1300` by [@&#8203;zanieb](https://github.com/zanieb) in https://github.com/astral-sh/ruff/pull/6616 ##### Playground - Shared playground links now use short URLs by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6383 - Fix possible JSON parse error on playground load by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6519 - Fix unreachable panic in playground by [@&#8203;MichaReiser](https://github.com/MichaReiser) in https://github.com/astral-sh/ruff/pull/6623 ##### Performance - Improve tokenizer performance for ASCII only identifiers by [@&#8203;MichaReiser](https://github.com/MichaReiser) in https://github.com/astral-sh/ruff/pull/6609 #### New Contributors - [@&#8203;magic-akari](https://github.com/magic-akari) made their first contribution in https://github.com/astral-sh/ruff/pull/6472 - [@&#8203;durumu](https://github.com/durumu) made their first contribution in https://github.com/astral-sh/ruff/pull/6378 - [@&#8203;jamesbraza](https://github.com/jamesbraza) made their first contribution in https://github.com/astral-sh/ruff/pull/6520 - [@&#8203;takumaw](https://github.com/takumaw) made their first contribution in https://github.com/astral-sh/ruff/pull/6533 - [@&#8203;noklam](https://github.com/noklam) made their first contribution in https://github.com/astral-sh/ruff/pull/6573 - [@&#8203;Teraskull](https://github.com/Teraskull) made their first contribution in https://github.com/astral-sh/ruff/pull/6605 **Full Changelog**: https://github.com/astral-sh/ruff/compare/v0.0.284...v0.0.285 ### [`v0.0.284`](https://github.com/astral-sh/ruff/releases/tag/v0.0.284) [Compare Source](https://github.com/astral-sh/ruff/compare/v0.0.283...v0.0.284) #### What's Changed 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 [@&#8203;rco-ableton](https://github.com/rco-ableton) for fixing this in https://github.com/astral-sh/ruff/pull/6444 ##### Bug Fixes - Do not trigger `S108` if path is inside `tempfile.*` call by [@&#8203;dhruvmanila](https://github.com/dhruvmanila) in https://github.com/astral-sh/ruff/pull/6416 - Do not allow on zero tab width by [@&#8203;tjkuson](https://github.com/tjkuson) in https://github.com/astral-sh/ruff/pull/6429 - Fix false-positive in submodule resolution by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6435 #### New Contributors - [@&#8203;rco-ableton](https://github.com/rco-ableton) made their first contribution in https://github.com/astral-sh/ruff/pull/6444 **Full Changelog**: https://github.com/astral-sh/ruff/compare/v0.0.283...v0.0.284 ### [`v0.0.283`](https://github.com/astral-sh/ruff/releases/tag/v0.0.283) [Compare Source](https://github.com/astral-sh/ruff/compare/v0.0.282...v0.0.283) <!-- Release notes generated using configuration in .github/release.yml at main --> #### What's Changed ##### Breaking Changes - Assume Python 3.8 instead of 3.10 for target version by [@&#8203;zanieb](https://github.com/zanieb) in https://github.com/astral-sh/ruff/pull/6397 ##### Rules - \[`flake8-pyi`] `PYI019`: Detects if a type variable is used instead of `Self` in return annotations by [@&#8203;qdegraaf](https://github.com/qdegraaf) in https://github.com/astral-sh/ruff/pull/6204 - \[`flake8-pyi`] `PYI051`: Detects unions of `Literal` types by [@&#8203;LaBatata101](https://github.com/LaBatata101) in https://github.com/astral-sh/ruff/pull/6215 - \[`flake8-pyi`] `PYI055`: Detects unions of `type`s by [@&#8203;LaBatata101](https://github.com/LaBatata101) in https://github.com/astral-sh/ruff/pull/6316 - \[`pylint`] `E1300`: Detects invalid string format characters by [@&#8203;silvanocerza](https://github.com/silvanocerza) in https://github.com/astral-sh/ruff/pull/6171 - \[`pyupgrade`] `UP040`: Upgrades type alias annotations to use PEP-695 syntax by [@&#8203;zanieb](https://github.com/zanieb) in https://github.com/astral-sh/ruff/pull/6289 ##### Rule Changes - \[`flake8-boolean-trap`] `FBT003`: Add `is_` and `is_not` to excluded functions by [@&#8203;zanieb](https://github.com/zanieb) in https://github.com/astral-sh/ruff/pull/6307 - \[`flake8-logging-format`] Allow capitalized names for logger candidate heuristic match by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6356 - \[`flake8-pyi`] Applicable rules are now checked non-stub code by [@&#8203;andersk](https://github.com/andersk) in https://github.com/astral-sh/ruff/pull/6297 - `PYI013`: [`ellipsis-in-non-empty-class-body`](https://beta.ruff.rs/docs/rules/ellipsis-in-non-empty-class-body) - `PYI016`: [`duplicate-union-member`](https://beta.ruff.rs/docs/rules/duplicate-union-member) - `PYI018`: [`unused-private-type-var`](https://beta.ruff.rs/docs/rules/unused-private-type-var) - `PYI019`: [`custom-type-var-return-type`](https://beta.ruff.rs/docs/rules/custom-type-var-return-type) - `PYI024`: [`collections-named-tuple`](https://beta.ruff.rs/docs/rules/collections-named-tuple) - `PYI025`: [`unaliased-collections-abc-set-import`](https://beta.ruff.rs/docs/rules/unaliased-collections-abc-set-import) - `PYI030`: [`unnecessary-literal-union`](https://beta.ruff.rs/docs/rules/unnecessary-literal-union) - `PYI032`: [`any-eq-ne-annotation`](https://beta.ruff.rs/docs/rules/any-eq-ne-annotation) - `PYI034`: [`non-self-return-type`](https://beta.ruff.rs/docs/rules/non-self-return-type) - `PYI036`: [`bad-exit-annotation`](https://beta.ruff.rs/docs/rules/bad-exit-annotation) - `PYI041`: [`redundant-numeric-union`](https://beta.ruff.rs/docs/rules/redundant-numeric-union) - `PYI042`: [`snake-case-type-alias`](https://beta.ruff.rs/docs/rules/snake-case-type-alias) - `PYI043`: [`t-suffixed-type-alias`](https://beta.ruff.rs/docs/rules/t-suffixed-type-alias) - `PYI045`: [`iter-method-return-iterable`](https://beta.ruff.rs/docs/rules/iter-method-return-iterable) - `PYI046`: [`unused-private-protocol`](https://beta.ruff.rs/docs/rules/unused-private-protocol) - `PYI047`: [`unused-private-type-alias`](https://beta.ruff.rs/docs/rules/unused-private-type-alias) - `PYI049`: [`unused-private-typed-dict`](https://beta.ruff.rs/docs/rules/unused-private-typed-dict) - `PYI050`: [`no-return-argument-annotation-in-stub`](https://beta.ruff.rs/docs/rules/no-return-argument-annotation-in-stub) (Python ≥ 3.11) - `PYI051`: [`redundant-literal-union`](https://beta.ruff.rs/docs/rules/redundant-literal-union) - `PYI056`: [`unsupported-method-call-on-all`](https://beta.ruff.rs/docs/rules/unsupported-method-call-on-all) - \[`flake8-pyi`] `PYI027` is being replaced by `PYI022` / `UP035` by [@&#8203;LaBatata101](https://github.com/LaBatata101) in https://github.com/astral-sh/ruff/pull/6354 - \[`pydocstyle`] `D103`: Don't require docstrings in `.pyi` files by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6239 - \[`pydocstyle`] `D203`: Ignore same-line docstrings for lines-before and lines-after rules by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6344 - \[`pylint`] `PLE0605`: Allow generic tuple and list calls in `__all__` by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6247 - \[`pylint`] `PLR0124`: Add detection of comparisons with built-in calls by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6324 - \[`pyupgrade`] `UP032`: Add support for `await` expressions in f-strings by [@&#8203;harupy](https://github.com/harupy) in https://github.com/astral-sh/ruff/pull/6304 - \[`pyupgrade`] `UP032`: Add support for implicitly concatenated strings by [@&#8203;harupy](https://github.com/harupy) in https://github.com/astral-sh/ruff/pull/6263 - \[`pyupgrade`] `UP032`: Add support for repeated format fields by [@&#8203;harupy](https://github.com/harupy) in https://github.com/astral-sh/ruff/pull/6266 - \[`ruff`] `RUF012`: Permit `ClassVar` and `Final` without subscript by [@&#8203;bluetech](https://github.com/bluetech) in https://github.com/astral-sh/ruff/pull/6273 ##### Bug Fixes - \[`flake8-bugbear`] `B006`: Respect `typing_extensions` imports of `Annotated` by [@&#8203;PIG208](https://github.com/PIG208) in https://github.com/astral-sh/ruff/pull/6361 - \[`flake8-pyi`] `PYI019`: Fix panic with positional-only arguments by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6350 - \[`flake8-use-pathlib`] Avoid raising `PTH206` with `maxsplit` by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6283 - \[`flake8`] `F841`: Update autofix to not remove Jupyer magic expressions by [@&#8203;dhruvmanila](https://github.com/dhruvmanila) in https://github.com/astral-sh/ruff/pull/6141 - \[`pycodestyle`] `E721`: Include comparisons to builtin types by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6325 - \[`pycodestyle`] `E721`: Match left-hand side `types()` call in `types-comparison` by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6326 - \[`pyupgrade`] `UP031`: Avoid auto-fixing if there are comments within the right-hand side by [@&#8203;harupy](https://github.com/harupy) in https://github.com/astral-sh/ruff/pull/6364 - \[`pyupgrade`] `UP032`: Avoid auto-fixing if comments are present around format call arguments by [@&#8203;harupy](https://github.com/harupy) in https://github.com/astral-sh/ruff/pull/6342 - \[`pyupgrade`] `UP032`: Improve invalid expression check by [@&#8203;harupy](https://github.com/harupy) in https://github.com/astral-sh/ruff/pull/6308 - Avoid attempting to fix `.format(...)` calls with too-few-arguments by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6401 - Fix bug where `.gitignore` files in parent directories were incorrectly used by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6368 - Fix duplicate violations raised on nested bitwise or `Union` expressions by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6399 ##### Playground - Add a simple tooltip to the sidebar by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6295 - Add an icon for FIR by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6292 - Increase icon opacity on-hover by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6291 - Tweak background on theme button by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6290 ##### Other Changes - Improve handling of violations around Jupyter magic expressions by [@&#8203;dhruvmanila](https://github.com/dhruvmanila) in https://github.com/astral-sh/ruff/pull/5552 - Reduce memory usage by boxing type params and arguments fields on the class definition node by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6275 - Upgrade Rust to 1.71 by [@&#8203;zanieb](https://github.com/zanieb) in https://github.com/astral-sh/ruff/pull/6323 #### New Contributors - [@&#8203;silvanocerza](https://github.com/silvanocerza) made their first contribution in https://github.com/astral-sh/ruff/pull/6171 - [@&#8203;PIG208](https://github.com/PIG208) made their first contribution in https://github.com/astral-sh/ruff/pull/6361 **Full Changelog**: https://github.com/astral-sh/ruff/compare/v0.0.282...v0.0.283 ### [`v0.0.282`](https://github.com/astral-sh/ruff/releases/tag/v0.0.282) [Compare Source](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.282 --> #### What's Changed ##### Bug Fixes - Reset model state when exiting deferred visitors by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6208 - Skip trivia when searching for named exception by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6218 - Avoid PERF401 false positive on list access in loop by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6220 - Avoid detecting continuations at non-start-of-line by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6219 - Revert "Expand scope of `quoted-annotation` rule ([#&#8203;5766](https://github.com/astral-sh/ruff/issues/5766))" by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6237 #### New Contributors - [@&#8203;klistwan](https://github.com/klistwan) made their first contribution in https://github.com/astral-sh/ruff/pull/6146 **Full Changelog**: https://github.com/astral-sh/ruff/compare/v0.0.281...v0.0.282 ### [`v0.0.281`](https://github.com/astral-sh/ruff/releases/tag/v0.0.281) [Compare Source](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.281 --> #### What's Changed See the [release blog post](https://astral.sh/blog/ruff-v0.0.281) for more, including detailed descriptions of any newly added rules. ##### New rules - \[`flake8-pyi`] Implement `PYI018` by [@&#8203;LaBatata101](https://github.com/LaBatata101) in https://github.com/astral-sh/ruff/pull/6018 - \[`flake8-pyi`] Implement `PYI047` by [@&#8203;LaBatata101](https://github.com/LaBatata101) in https://github.com/astral-sh/ruff/pull/6134 - \[`flake8-pyi`] Implement `PYI049` by [@&#8203;LaBatata101](https://github.com/LaBatata101) in https://github.com/astral-sh/ruff/pull/6136 - \[`flake8-pyi`] Implement `PYI056` by [@&#8203;LaBatata101](https://github.com/LaBatata101) in https://github.com/astral-sh/ruff/pull/5959 - \[`flake8-pyi`] Implement `PYI046` by [@&#8203;LaBatata101](https://github.com/LaBatata101) in https://github.com/astral-sh/ruff/pull/6098 - \[`flake8-use-pathlib`] Implement `glob` (`PTH207`) by [@&#8203;sbrugman](https://github.com/sbrugman) in https://github.com/astral-sh/ruff/pull/5939 - \[`flake8-use-pathlib`] Implement `os-sep-split` (`PTH206`) by [@&#8203;sbrugman](https://github.com/sbrugman) in https://github.com/astral-sh/ruff/pull/5936 - \[`pycodestyle`] Implement `E241` and `E242` (tab/multiple ws after commas) by [@&#8203;akx](https://github.com/akx) in https://github.com/astral-sh/ruff/pull/6094 - \[`pylint`] Implement `self-assigning-variable` (`W0127`) by [@&#8203;tjkuson](https://github.com/tjkuson) in https://github.com/astral-sh/ruff/pull/6015 - \[`pylint`] Implement `eq-without-hash` rule (PLW1641) by [@&#8203;jelly](https://github.com/jelly) in https://github.com/astral-sh/ruff/pull/5955 - \[`pylint`] Implement `subprocess-popen-preexec-fn` (`W1509`) by [@&#8203;tjkuson](https://github.com/tjkuson) in https://github.com/astral-sh/ruff/pull/5978 ##### Rule changes - \[`flake8-bugbear`] Extends `B002` to detect unary prefix decrement operators by [@&#8203;tjkuson](https://github.com/tjkuson) in https://github.com/astral-sh/ruff/pull/5998 - \[`flake8-pytest-style`] Avoid raising PT012 for simple `with` statements by [@&#8203;harupy](https://github.com/harupy) in https://github.com/astral-sh/ruff/pull/6081 - \[`flake8-pytest-style`] Allow pytest.raises body to contain a single func or class definition by [@&#8203;harupy](https://github.com/harupy) in https://github.com/astral-sh/ruff/pull/6083 - \[`flake8-simplify`] Extend SIM118 with `not in` by [@&#8203;sbrugman](https://github.com/sbrugman) in https://github.com/astral-sh/ruff/pull/5995 - \[`perflint`] Skip `PERF203` violations for multi-statement loops by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6145 - \[`pyupgrade`] Add support for `int`, `float`, `bool` in `UP018` by [@&#8203;dhruvmanila](https://github.com/dhruvmanila) in https://github.com/astral-sh/ruff/pull/6013 - \[`tryceratops`] Add suggested fix for `TRY201` by [@&#8203;dhruvmanila](https://github.com/dhruvmanila) in https://github.com/astral-sh/ruff/pull/6008 ##### Settings - Allow specification of `logging.Logger` re-exports via `logger-objects` by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/5750 - Set default `max-complexity` to 10 for empty McCabe settings by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6073 - \[`pep8-naming`]: New config option `extend-ignore-names` by [@&#8203;dhruvmanila](https://github.com/dhruvmanila) in https://github.com/astral-sh/ruff/pull/6169 ##### Bug Fixes - Avoid raising `UP032` if `format` call arguments contain multiline expressions by [@&#8203;harupy](https://github.com/harupy) in https://github.com/astral-sh/ruff/pull/5971 - Fix `F507` false positive by [@&#8203;harupy](https://github.com/harupy) in https://github.com/astral-sh/ruff/pull/5986 - Fix logging rules with whitespace around dot by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6022 - Ignore end-of-line comments when dirtying if-with-same-arms branches by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6031 - Avoid treating `Literal` members as expressions with `__future__` by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6032 - Avoid refactoring `x[:1]`-like slices in RUF015 by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6150 - Avoid key-in-dict violations for `self` accesses by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6165 - Avoid falsely marking non-submodules as submodule aliases by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6182 - Flag `[` as an invalid noqa suffix by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/5982 - Ignore some common builtin overrides on standard library subclasses by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6074 - Avoid A003 violations for explicitly overridden methods by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6076 - Include file permissions in key for cached files by [@&#8203;zanieb](https://github.com/zanieb) in https://github.com/astral-sh/ruff/pull/5901 - Ignore `explicit-string-concatenation` on single line by [@&#8203;tjkuson](https://github.com/tjkuson) in https://github.com/astral-sh/ruff/pull/6028 - Fix `SIM102` to handle indented `elif` by [@&#8203;harupy](https://github.com/harupy) in https://github.com/astral-sh/ruff/pull/6072 - Raise `PTH201` for `Path("")` by [@&#8203;harupy](https://github.com/harupy) in https://github.com/astral-sh/ruff/pull/6095 - Update `SIM115` to cover `pathlib.Path.open` by [@&#8203;harupy](https://github.com/harupy) in https://github.com/astral-sh/ruff/pull/611 - Ignore end-of-line file exemption comments by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6160 - Implement `--diff` for Jupyter Notebooks by [@&#8203;dhruvmanila](https://github.com/dhruvmanila) in https://github.com/astral-sh/ruff/pull/6149 - Skip BOM when determining Locator's line starts by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/6159 - Avoid parenthesizing comprehension element by [@&#8203;dhruvmanila](https://github.com/dhruvmanila) in https://github.com/astral-sh/ruff/pull/6198 - Do not raise `SIM105` for non-exceptions by [@&#8203;sbrugman](https://github.com/sbrugman) in https://github.com/astral-sh/ruff/pull/5985 #### New Contributors - [@&#8203;AlexWaygood](https://github.com/AlexWaygood) made their first contribution in https://github.com/astral-sh/ruff/pull/5973 - [@&#8203;RMPR](https://github.com/RMPR) made their first contribution in https://github.com/astral-sh/ruff/pull/6048 - [@&#8203;arembridge](https://github.com/arembridge) made their first contribution in https://github.com/astral-sh/ruff/pull/6079 - [@&#8203;Eutropios](https://github.com/Eutropios) made their first contribution in https://github.com/astral-sh/ruff/pull/6082 - [@&#8203;jelly](https://github.com/jelly) made their first contribution in https://github.com/astral-sh/ruff/pull/5955 **Full Changelog**: https://github.com/astral-sh/ruff/compare/v0.0.280...v0.0.281 ### [`v0.0.280`](https://github.com/astral-sh/ruff/releases/tag/v0.0.280) [Compare Source](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.280 --> #### What's Changed ##### Bug Fixes - Avoid collapsing `elif` and `else` branches during import sorting by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/5964 **Full Changelog**: https://github.com/astral-sh/ruff/compare/v0.0.279...v0.0.280 ### [`v0.0.279`](https://github.com/astral-sh/ruff/releases/tag/v0.0.279) [Compare Source](https://github.com/astral-sh/ruff/compare/v0.0.278...v0.0.279) <!-- Release notes generated using configuration in .github/release.yml at v0.0.279 --> #### What's Changed ##### Rules - \[`flake8-pyi`] Implement flake8-pyi's PYI026 by [@&#8203;LaBatata101](https://github.com/LaBatata101) in https://github.com/astral-sh/ruff/pull/5844 - \[`flake8-pyi`] Implement flake8-pyi's `PYI017` by [@&#8203;qdegraaf](https://github.com/qdegraaf) in https://github.com/astral-sh/ruff/pull/5895 - \[`flake8-pyi`] Implement flake8-pyi's `PYI036` by [@&#8203;density](https://github.com/density) in https://github.com/astral-sh/ruff/pull/5668 - \[`flake8-pyi`] Implement flake8-pyi's `PYI041` by [@&#8203;density](https://github.com/density) in https://github.com/astral-sh/ruff/pull/5722 - \[`flake8-use-pathlib`] Implement `os-path-getsize` and `os-path-get(a|m|c)-time` (`PTH202-205`) by [@&#8203;sbrugman](https://github.com/sbrugman) in https://github.com/astral-sh/ruff/pull/5835 - \[`flake8-use-pathlib`] Implement `path-constructor-default-argument` (`PTH201`) by [@&#8203;sbrugman](https://github.com/sbrugman) in https://github.com/astral-sh/ruff/pull/5833 - \[`pandas-vet`] Implement constant series rule (`PD101`) by [@&#8203;sbrugman](https://github.com/sbrugman) in https://github.com/astral-sh/ruff/pull/5802 - \[`pylint`] Implement Pylint's `consider-using-in` (`PLR1714`) by [@&#8203;tjkuson](https://github.com/tjkuson) in https://github.com/astral-sh/ruff/pull/5193 ##### Rule changes - \[`flake8-annotations`] Check for `Any` in other types for `ANN401` by [@&#8203;dhruvmanila](https://github.com/dhruvmanila) in https://github.com/astral-sh/ruff/pull/5601 - \[`flake8-bugbear`] Add autofix for B004 by [@&#8203;density](https://github.com/density) in https://github.com/astral-sh/ruff/pull/5788 - \[`flake8-bugbear`] Remove `B904`'s lowercase exemption by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/5751 - \[`flake8-use-pathlib`] extend PTH118 with `os.sep` by [@&#8203;sbrugman](https://github.com/sbrugman) in https://github.com/astral-sh/ruff/pull/5935 - \[`pyupgrade`] Expand scope of `quoted-annotation` rule (`UP037`) by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/5766 - \[`pyupgrade`] Extend PEP 604 rewrites to support some quoted annotations by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/5725 - \[`ruff`] Expand `RUF015` to include all expression types by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/5767 ##### Bug Fixes - Consider single element subscript expr for implicit optional by [@&#8203;dhruvmanila](https://github.com/dhruvmanila) in https://github.com/astral-sh/ruff/pull/5717 - Ignore `Enum`-and-`str` subclasses for slots enforcement by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/5749 - Avoid removing raw strings in comparison fixes by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/5755 - Fix nested calls to `sorted` with differing arguments by [@&#8203;density](https://github.com/density) in https://github.com/astral-sh/ruff/pull/5761 - Use unused variable detection to power `incorrect-dict-iterator` by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/5763 - Include alias when formatting import-from structs by [@&#8203;guillaumeLepape](https://github.com/guillaumeLepape) in https://github.com/astral-sh/ruff/pull/5786 - Make `lint_only` aware of the source kind by [@&#8203;dhruvmanila](https://github.com/dhruvmanila) in https://github.com/astral-sh/ruff/pull/5876 - Restore `redefined-while-unused` violations in classes by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/5926 - Flatten nested tuples when fixing UP007 violations by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/5724 - Ignore Jupyter Notebooks for `--add-noqa` by [@&#8203;dhruvmanila](https://github.com/dhruvmanila) in https://github.com/astral-sh/ruff/pull/5727 - Avoid checking `EXE001` and `EXE002` on WSL by [@&#8203;tjkuson](https://github.com/tjkuson) in https://github.com/astral-sh/ruff/pull/5735 - Properly group assignment targets by [@&#8203;MichaReiser](https://github.com/MichaReiser) in https://github.com/astral-sh/ruff/pull/5728 - Avoid stack overflow for non-BitOr binary types by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/5743 - Move function visit out of `Expr::Call` branches by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/5772 - \[B006] Add bytes to immutable types by [@&#8203;harupy](https://github.com/harupy) in https://github.com/astral-sh/ruff/pull/5776 - Format `SetComp` by [@&#8203;lkh42t](https://github.com/lkh42t) in https://github.com/astral-sh/ruff/pull/5774 - Gate `runtime-import-in-type-checking-block` (`TCH004`) behind enabled flag by [@&#8203;charliermarsh](https://github.com/charliermarsh) in https://github.com/astral-sh/ruff/pull/5789 - perf: only compute start offset for overlong lines by [@&#8203;sbrugman](https://github.com/sbrugman) in https://github.com/astral-sh/ruff/pull/5811 - Change `pandas-use-of-dot-read-table` rule to emit only when `read_table` is used on CSV data by [@&#8203;tjkuson](https://github.com/tjkuson) in https://github.com/astral-sh/ruff/pull/5807 - Do not fix `NamedTuple` calls containing both a list of fields and keywords by [@&#8203;harupy](https://github.com/harupy) in https://github.com/astral-sh/ruff/pull/5799 - Ignore directories when collecting files to lint by [@&#8203;harupy](https://github.com/harupy) in https://github.com/astral-sh/ruff/pull/5775 - Add filename to `noqa` warnings by [@&#8203;sobolevn](https://github.com/sobolevn) in https://github.com/astral-sh/ruff/pull/5856 - Handle io errors gracefully by [@&#8203;konstin](https://github.com/konstin) in https://github.com/astral-sh/ruff/pull/5611 - Allow `respect_gitignore` when not in a git repo by [@&#8203;dhruvmanila](https://github.com/dhruvmanila) in https://github.com/astral-sh/ruff/pull/5937 #### New Contributors - [@&#8203;eggplants](https://github.com/eggplants) made their first contribution in https://github.com/astral-sh/ruff/pull/5741 - [@&#8203;guillaumeLepape](https://github.com/guillaumeLepape) made their first contribution in https://github.com/astral-sh/ruff/pull/5786 - [@&#8203;odiseo0](https://github.com/odiseo0) made their first contribution in https://github.com/astral-sh/ruff/pull/5888 - [@&#8203;DavidCain](https://github.com/DavidCain) made their first contribution in https://github.com/astral-sh/ruff/pull/5889 - [@&#8203;LaBatata101](https://github.com/LaBatata101) made their first contribution in https://github.com/astral-sh/ruff/pull/5844 **Full Changelog**: https://github.com/astral-sh/ruff/compare/v0.0.278...v0.0.279 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yMC4yIiwidXBkYXRlZEluVmVyIjoiMzcuMTE2LjAiLCJ0YXJnZXRCcmFuY2giOiJtYXN0ZXIifQ==-->
renovate force-pushed renovate/ruff-0.x from 63b8007ea5 to 44084332d1 2023-10-20 08:01:29 +01:00 Compare
renovate changed title from Update dependency ruff to v0.1.0 to Update dependency ruff to v0.1.1 2023-10-20 08:01:31 +01:00
renovate force-pushed renovate/ruff-0.x from 44084332d1 to 94a1df6c18 2023-10-24 18:00:52 +01:00 Compare
renovate changed title from Update dependency ruff to v0.1.1 to Update dependency ruff to v0.1.2 2023-10-24 18:00:55 +01:00
renovate force-pushed renovate/ruff-0.x from 94a1df6c18 to 6dc0567802 2023-10-26 22:00:46 +01:00 Compare
renovate changed title from Update dependency ruff to v0.1.2 to Update dependency ruff to v0.1.3 2023-10-26 22:00:47 +01:00
renovate force-pushed renovate/ruff-0.x from 6dc0567802 to 826a63ef41 2023-11-03 22:00:58 +00:00 Compare
renovate changed title from Update dependency ruff to v0.1.3 to Update dependency ruff to v0.1.4 2023-11-03 22:00:59 +00:00
renovate force-pushed renovate/ruff-0.x from 826a63ef41 to eedb422a39 2023-11-09 08:00:46 +00:00 Compare
renovate changed title from Update dependency ruff to v0.1.4 to Update dependency ruff to v0.1.5 2023-11-09 08:00:48 +00:00
renovate force-pushed renovate/ruff-0.x from eedb422a39 to d6cb2ec0cd 2023-11-17 20:01:01 +00:00 Compare
renovate changed title from Update dependency ruff to v0.1.5 to Update dependency ruff to v0.1.6 2023-11-17 20:01:06 +00:00
renovate force-pushed renovate/ruff-0.x from d6cb2ec0cd to ecb88edac1 2023-12-04 22:00:44 +00:00 Compare
renovate changed title from Update dependency ruff to v0.1.6 to Update dependency ruff to v0.1.7 2023-12-04 22:00:45 +00:00
renovate force-pushed renovate/ruff-0.x from ecb88edac1 to eadb23d8e0 2023-12-13 20:00:45 +00:00 Compare
renovate changed title from Update dependency ruff to v0.1.7 to Update dependency ruff to v0.1.8 2023-12-13 20:00:47 +00:00
renovate force-pushed renovate/ruff-0.x from eadb23d8e0 to 5c70d81050 2023-12-21 20:00:45 +00:00 Compare
renovate changed title from Update dependency ruff to v0.1.8 to Update dependency ruff to v0.1.9 2023-12-21 20:00:49 +00:00
renovate force-pushed renovate/ruff-0.x from 5c70d81050 to 749b500677 2024-01-02 20:00:55 +00:00 Compare
renovate changed title from Update dependency ruff to v0.1.9 to Update dependency ruff to v0.1.10 2024-01-02 20:00:57 +00:00
renovate force-pushed renovate/ruff-0.x from 749b500677 to f18534af55 2024-01-03 08:01:04 +00:00 Compare
renovate changed title from Update dependency ruff to v0.1.10 to Update dependency ruff to v0.1.11 2024-01-03 08:01:06 +00:00
renovate changed title from Update dependency ruff to v0.1.11 to Update dependency ruff to v0.1.11 - autoclosed 2024-01-05 18:01:05 +00:00
renovate closed this pull request 2024-01-05 18:01:05 +00:00

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: repos/website#83
No description provided.