Closed renovate[bot] closed 1 year ago
Patch coverage has no change and project coverage change: -0.15%
:warning:
Comparison is base (
fd2a669
) 92.19% compared to head (236ceac
) 92.04%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
This PR contains the following updates:
^0.0.272
->^0.0.287
Release Notes
astral-sh/ruff (ruff)
### [`v0.0.287`](https://togithub.com/astral-sh/ruff/releases/tag/v0.0.287) [Compare Source](https://togithub.com/astral-sh/ruff/compare/v0.0.286...v0.0.287) #### What's Changed ##### Rules - \[refurb] Implement previuew `repeated-append` rule (`FURB113`) by [@SavchenkoValeriy](https://togithub.com/SavchenkoValeriy) in [https://github.com/astral-sh/ruff/pull/6702](https://togithub.com/astral-sh/ruff/pull/6702) - \[refurb] Implement previuew `delete-full-slice` rule (`FURB131`) by [@SavchenkoValeriy](https://togithub.com/SavchenkoValeriy) in [https://github.com/astral-sh/ruff/pull/6897](https://togithub.com/astral-sh/ruff/pull/6897) - \[refurb] Implement preview `check-and-remove-from-set` rule (`FURB132`) by [@SavchenkoValeriy](https://togithub.com/SavchenkoValeriy) in [https://github.com/astral-sh/ruff/pull/6904](https://togithub.com/astral-sh/ruff/pull/6904) ##### Bug Fixes - Expand `PERF401` and `PERF402` with type checks by [@qdegraaf](https://togithub.com/qdegraaf) in [https://github.com/astral-sh/ruff/pull/6994](https://togithub.com/astral-sh/ruff/pull/6994) - Insert space to avoid syntax error in RSE fixes by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6886](https://togithub.com/astral-sh/ruff/pull/6886) - Avoid PEP 604 upgrades that lead to invalid syntax by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6888](https://togithub.com/astral-sh/ruff/pull/6888) - Fix ranges for global usages by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6917](https://togithub.com/astral-sh/ruff/pull/6917) - Avoid invalid fix for C417 with separate keys and values by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6954](https://togithub.com/astral-sh/ruff/pull/6954) - Avoid panic when `typename` is provided as a keyword argument by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6955](https://togithub.com/astral-sh/ruff/pull/6955) - Improve compatibility between multi-statement PYI rules by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/7024](https://togithub.com/astral-sh/ruff/pull/7024) - Fixed panic in `missing_copyright_notice` by [@WindowGenerator](https://togithub.com/WindowGenerator) in [https://github.com/astral-sh/ruff/pull/7029](https://togithub.com/astral-sh/ruff/pull/7029) - Avoid lexer infinite loop on invalid input by [@dhruvmanila](https://togithub.com/dhruvmanila) in [https://github.com/astral-sh/ruff/pull/6937](https://togithub.com/astral-sh/ruff/pull/6937) - Fix `WithItem` ranges for parenthesized, non-`as` items by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6782](https://togithub.com/astral-sh/ruff/pull/6782) #### New Contributors - [@SavchenkoValeriy](https://togithub.com/SavchenkoValeriy) made their first contribution in [https://github.com/astral-sh/ruff/pull/6702](https://togithub.com/astral-sh/ruff/pull/6702) - [@Anselmoo](https://togithub.com/Anselmoo) made their first contribution in [https://github.com/astral-sh/ruff/pull/6986](https://togithub.com/astral-sh/ruff/pull/6986) - [@njgrisafi](https://togithub.com/njgrisafi) made their first contribution in [https://github.com/astral-sh/ruff/pull/7032](https://togithub.com/astral-sh/ruff/pull/7032) - [@WindowGenerator](https://togithub.com/WindowGenerator) made their first contribution in [https://github.com/astral-sh/ruff/pull/7029](https://togithub.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://togithub.com/astral-sh/ruff/releases/tag/v0.0.286) [Compare Source](https://togithub.com/astral-sh/ruff/compare/v0.0.285...v0.0.286) #### What's Changed ##### New Rules - \[`flake8-bugbear`] Update `function-call-in-argument-default` (`B008`) to ignore arguments with immutable annotations by [@zanieb](https://togithub.com/zanieb) in [https://github.com/astral-sh/ruff/pull/6784](https://togithub.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 [@zanieb](https://togithub.com/zanieb) in [https://github.com/astral-sh/ruff/pull/6781](https://togithub.com/astral-sh/ruff/pull/6781) - \[`flake8-pie`] Implement `unnecessary-range-start` (`PIE808`) by [@harupy](https://togithub.com/harupy) in [https://github.com/astral-sh/ruff/pull/6690](https://togithub.com/astral-sh/ruff/pull/6690) - \[`flake8-pytest-style`] Add autofix for `PT014` by [@harupy](https://togithub.com/harupy) in [https://github.com/astral-sh/ruff/pull/6698](https://togithub.com/astral-sh/ruff/pull/6698) - \[`pylint`] Implement `no-self-use` (`R6301`) by [@LaBatata101](https://togithub.com/LaBatata101) in [https://github.com/astral-sh/ruff/pull/6574](https://togithub.com/astral-sh/ruff/pull/6574) - \[`pylint`] Extend `repeated-equality-comparison-target` to check for mixed orderings and Yoda conditions. by [@tjkuson](https://togithub.com/tjkuson) in [https://github.com/astral-sh/ruff/pull/6691](https://togithub.com/astral-sh/ruff/pull/6691) ##### Settings - Make isort's `detect-same-package` behavior configurable by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6833](https://togithub.com/astral-sh/ruff/pull/6833) ##### Bug Fixes - Apply RUF017 when start is passed via position by [@hauntsaninja](https://togithub.com/hauntsaninja) in [https://github.com/astral-sh/ruff/pull/6664](https://togithub.com/astral-sh/ruff/pull/6664) - Use `typing_extensions.TypeAlias` for PYI026 fixes on pre-3.10 by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6696](https://togithub.com/astral-sh/ruff/pull/6696) - Ignore multi-comparisons in `repeated-equality-comparison-target` by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6705](https://togithub.com/astral-sh/ruff/pull/6705) - Accept empty inner calls in C414 by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6725](https://togithub.com/astral-sh/ruff/pull/6725) - Allow next in FBT exclusions by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6729](https://togithub.com/astral-sh/ruff/pull/6729) - Allow `ctypes.WinError()` in flake8-raise by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6731](https://togithub.com/astral-sh/ruff/pull/6731) - Ignore star imports when importing symbols in fixes by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6743](https://togithub.com/astral-sh/ruff/pull/6743) - Support C419 autofixes for set comprehensions by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6744](https://togithub.com/astral-sh/ruff/pull/6744) - Avoid attempting to fix unconventional submodule imports by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6745](https://togithub.com/astral-sh/ruff/pull/6745) - Don't trigger `eq-without-hash` when `__hash__` is explicitly set to `None` by [@LaBatata101](https://togithub.com/LaBatata101) in [https://github.com/astral-sh/ruff/pull/6739](https://togithub.com/astral-sh/ruff/pull/6739) - Avoid E231 if comma is at end-of-line by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6747](https://togithub.com/astral-sh/ruff/pull/6747) - Truncate some messages in diagnostics by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6748](https://togithub.com/astral-sh/ruff/pull/6748) - Fix isolation groups for unused imports by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6774](https://togithub.com/astral-sh/ruff/pull/6774) - Avoid fixing D200 for docstrings that end in escapes by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6779](https://togithub.com/astral-sh/ruff/pull/6779) - Parenthesize expressions prior to LibCST parsing by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6742](https://togithub.com/astral-sh/ruff/pull/6742) - Fallback to end-of-file if ends in trailing continuation by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6789](https://togithub.com/astral-sh/ruff/pull/6789) - Confine repeated-equality-comparison-target to names and attributes by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6802](https://togithub.com/astral-sh/ruff/pull/6802) - Fix `native-literals` handling of int literal with attribute access by [@zanieb](https://togithub.com/zanieb) in [https://github.com/astral-sh/ruff/pull/6792](https://togithub.com/astral-sh/ruff/pull/6792) - Fix `uncessary-coding-comment` fix when there's leading content by [@zanieb](https://togithub.com/zanieb) in [https://github.com/astral-sh/ruff/pull/6775](https://togithub.com/astral-sh/ruff/pull/6775) - Avoid attempting to fix PT018 in multi-statement lines by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6829](https://togithub.com/astral-sh/ruff/pull/6829) - Update ERA100 to apply to commented dictionary items with trailing comments by [@zanieb](https://togithub.com/zanieb) in [https://github.com/astral-sh/ruff/pull/6822](https://togithub.com/astral-sh/ruff/pull/6822) - Avoid parsing other parts of a format specification if replacements are present by [@zanieb](https://togithub.com/zanieb) in [https://github.com/astral-sh/ruff/pull/6858](https://togithub.com/astral-sh/ruff/pull/6858) - Avoid panic in unused arguments rule for parameter-free lambda by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6679](https://togithub.com/astral-sh/ruff/pull/6679) - Avoid `C417` for `lambda` with default and variadic parameters by [@dhruvmanila](https://togithub.com/dhruvmanila) in [https://github.com/astral-sh/ruff/pull/6752](https://togithub.com/astral-sh/ruff/pull/6752) - Add `networkx` to conventional aliases by [@zanieb](https://togithub.com/zanieb) in [https://github.com/astral-sh/ruff/pull/6778](https://togithub.com/astral-sh/ruff/pull/6778) - Skip serializing cell ID if it's None by [@harupy](https://togithub.com/harupy) in [https://github.com/astral-sh/ruff/pull/6851](https://togithub.com/astral-sh/ruff/pull/6851) - fix is_raw_string for multiple prefixes by [@davidszotten](https://togithub.com/davidszotten) in [https://github.com/astral-sh/ruff/pull/6865](https://togithub.com/astral-sh/ruff/pull/6865) - Add jupyter notebook cell ids in 4.5+ if missing by [@konstin](https://togithub.com/konstin) in [https://github.com/astral-sh/ruff/pull/6853](https://togithub.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://togithub.com/astral-sh/ruff/releases/tag/v0.0.285) [Compare Source](https://togithub.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 [@harupy](https://togithub.com/harupy) in [https://github.com/astral-sh/ruff/pull/6554](https://togithub.com/astral-sh/ruff/pull/6554) - \[`flake8-pytest-style`] Implement `pytest-duplicate-parametrize-test-cases` (`PT014`) by [@harupy](https://togithub.com/harupy) in [https://github.com/astral-sh/ruff/pull/6598](https://togithub.com/astral-sh/ruff/pull/6598) - \[`flake8-tidy-imports`] Implement `banned-module-level-imports` (`TID253`) by [@durumu](https://togithub.com/durumu) in [https://github.com/astral-sh/ruff/pull/6378](https://togithub.com/astral-sh/ruff/pull/6378) - \[`pylint`] Implement `bad-dunder-name` (`W3201`) (in the Ruff nursery) by [@LaBatata101](https://togithub.com/LaBatata101) in [https://github.com/astral-sh/ruff/pull/6486](https://togithub.com/astral-sh/ruff/pull/6486) - \[`pylint`] Implement `subprocess-run-check` (`W1510`) by [@tjkuson](https://togithub.com/tjkuson) in [https://github.com/astral-sh/ruff/pull/6487](https://togithub.com/astral-sh/ruff/pull/6487) - \[`ruff`] Implement `quadratic-list-summation` (`RUF017`) by [@evanrittenhouse](https://togithub.com/evanrittenhouse) in [https://github.com/astral-sh/ruff/pull/6489](https://togithub.com/astral-sh/ruff/pull/6489) ##### Rule changes - \[`flake8-bugbear`] Add autofix for `B006` by [@qdegraaf](https://togithub.com/qdegraaf) in [https://github.com/astral-sh/ruff/pull/6131](https://togithub.com/astral-sh/ruff/pull/6131) - \[`flake8-pyi`] Avoid applying `PYI055` to runtime-evaluated annotations by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6457](https://togithub.com/astral-sh/ruff/pull/6457) - \[`flake8-self`] Allow `os._exit` accesses in `SLF001` by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6490](https://togithub.com/astral-sh/ruff/pull/6490) - \[`perflint`] Ignore `PERF203` if `try` contains loop control flow statements by [@evanrittenhouse](https://togithub.com/evanrittenhouse) in [https://github.com/astral-sh/ruff/pull/6536](https://togithub.com/astral-sh/ruff/pull/6536) - \[`pylint`] Check for invalid format type specifiers in nested replacements for `PLE1300` by [@zanieb](https://togithub.com/zanieb) in [https://github.com/astral-sh/ruff/pull/6616](https://togithub.com/astral-sh/ruff/pull/6616) - \[`tryceratops`] Omit `NotImplementedError` from `TRY003` by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6568](https://togithub.com/astral-sh/ruff/pull/6568) ##### Settings - Respect `.ipynb` and `.pyi` sources when linting from stdin by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6628](https://togithub.com/astral-sh/ruff/pull/6628) - Support glob patterns for `raises_require_match_for` and `raises_require_match_for` by [@harupy](https://togithub.com/harupy) in [https://github.com/astral-sh/ruff/pull/6635](https://togithub.com/astral-sh/ruff/pull/6635) ##### Bug Fixes - Make `lambda-assignment` fix always-manual in class bodies by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6626](https://togithub.com/astral-sh/ruff/pull/6626) - Fix counting of message arguments when msg is provided as a keyword by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6456](https://togithub.com/astral-sh/ruff/pull/6456) - Add container types to `E721` by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6469](https://togithub.com/astral-sh/ruff/pull/6469) - Respect scoping rules when identifying builtins by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6468](https://togithub.com/astral-sh/ruff/pull/6468) - Respect tab width in line-length heuristic by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6491](https://togithub.com/astral-sh/ruff/pull/6491) - Respect dummy-variable-rgx for unused bound exceptions by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6492](https://togithub.com/astral-sh/ruff/pull/6492) - Fix detection of top-level imports with newlines in `E402` by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6526](https://togithub.com/astral-sh/ruff/pull/6526) - Allow if-expression with dual string arms in `invalid-envvar-value` by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6538](https://togithub.com/astral-sh/ruff/pull/6538) - Add deprecated unittest assertions to PT009 by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6572](https://togithub.com/astral-sh/ruff/pull/6572) - Avoid unused argument rules when functions call `locals()` by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6578](https://togithub.com/astral-sh/ruff/pull/6578) - Allow top-level `await` in Jupyter notebooks by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6607](https://togithub.com/astral-sh/ruff/pull/6607) - Don't detect `pandas#values` for stores, deletes, or class accesses by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6631](https://togithub.com/astral-sh/ruff/pull/6631) - Avoid removing parentheses in `E712` fix by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6575](https://togithub.com/astral-sh/ruff/pull/6575) - Skip whitespace between comments at start of file e.g. for `I002` by [@durumu](https://togithub.com/durumu) in [https://github.com/astral-sh/ruff/pull/6523](https://togithub.com/astral-sh/ruff/pull/6523) - Add support for nested replacements inside format specifications e.g. for `PLE1300` by [@zanieb](https://togithub.com/zanieb) in [https://github.com/astral-sh/ruff/pull/6616](https://togithub.com/astral-sh/ruff/pull/6616) ##### Playground - Shared playground links now use short URLs by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6383](https://togithub.com/astral-sh/ruff/pull/6383) - Fix possible JSON parse error on playground load by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6519](https://togithub.com/astral-sh/ruff/pull/6519) - Fix unreachable panic in playground by [@MichaReiser](https://togithub.com/MichaReiser) in [https://github.com/astral-sh/ruff/pull/6623](https://togithub.com/astral-sh/ruff/pull/6623) ##### Performance - Improve tokenizer performance for ASCII only identifiers by [@MichaReiser](https://togithub.com/MichaReiser) in [https://github.com/astral-sh/ruff/pull/6609](https://togithub.com/astral-sh/ruff/pull/6609) #### New Contributors - [@magic-akari](https://togithub.com/magic-akari) made their first contribution in [https://github.com/astral-sh/ruff/pull/6472](https://togithub.com/astral-sh/ruff/pull/6472) - [@durumu](https://togithub.com/durumu) made their first contribution in [https://github.com/astral-sh/ruff/pull/6378](https://togithub.com/astral-sh/ruff/pull/6378) - [@jamesbraza](https://togithub.com/jamesbraza) made their first contribution in [https://github.com/astral-sh/ruff/pull/6520](https://togithub.com/astral-sh/ruff/pull/6520) - [@takumaw](https://togithub.com/takumaw) made their first contribution in [https://github.com/astral-sh/ruff/pull/6533](https://togithub.com/astral-sh/ruff/pull/6533) - [@noklam](https://togithub.com/noklam) made their first contribution in [https://github.com/astral-sh/ruff/pull/6573](https://togithub.com/astral-sh/ruff/pull/6573) - [@Teraskull](https://togithub.com/Teraskull) made their first contribution in [https://github.com/astral-sh/ruff/pull/6605](https://togithub.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://togithub.com/astral-sh/ruff/releases/tag/v0.0.284) [Compare Source](https://togithub.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 [@rco-ableton](https://togithub.com/rco-ableton) for fixing this in [https://github.com/astral-sh/ruff/pull/6444](https://togithub.com/astral-sh/ruff/pull/6444) ##### Bug Fixes - Do not trigger `S108` if path is inside `tempfile.*` call by [@dhruvmanila](https://togithub.com/dhruvmanila) in [https://github.com/astral-sh/ruff/pull/6416](https://togithub.com/astral-sh/ruff/pull/6416) - Do not allow on zero tab width by [@tjkuson](https://togithub.com/tjkuson) in [https://github.com/astral-sh/ruff/pull/6429](https://togithub.com/astral-sh/ruff/pull/6429) - Fix false-positive in submodule resolution by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6435](https://togithub.com/astral-sh/ruff/pull/6435) #### New Contributors - [@rco-ableton](https://togithub.com/rco-ableton) made their first contribution in [https://github.com/astral-sh/ruff/pull/6444](https://togithub.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://togithub.com/astral-sh/ruff/releases/tag/v0.0.283) [Compare Source](https://togithub.com/astral-sh/ruff/compare/v0.0.282...v0.0.283) #### What's Changed ##### Breaking Changes - Assume Python 3.8 instead of 3.10 for target version by [@zanieb](https://togithub.com/zanieb) in [https://github.com/astral-sh/ruff/pull/6397](https://togithub.com/astral-sh/ruff/pull/6397) ##### Rules - \[`flake8-pyi`] `PYI019`: Detects if a type variable is used instead of `Self` in return annotations by [@qdegraaf](https://togithub.com/qdegraaf) in [https://github.com/astral-sh/ruff/pull/6204](https://togithub.com/astral-sh/ruff/pull/6204) - \[`flake8-pyi`] `PYI051`: Detects unions of `Literal` types by [@LaBatata101](https://togithub.com/LaBatata101) in [https://github.com/astral-sh/ruff/pull/6215](https://togithub.com/astral-sh/ruff/pull/6215) - \[`flake8-pyi`] `PYI055`: Detects unions of `type`s by [@LaBatata101](https://togithub.com/LaBatata101) in [https://github.com/astral-sh/ruff/pull/6316](https://togithub.com/astral-sh/ruff/pull/6316) - \[`pylint`] `E1300`: Detects invalid string format characters by [@silvanocerza](https://togithub.com/silvanocerza) in [https://github.com/astral-sh/ruff/pull/6171](https://togithub.com/astral-sh/ruff/pull/6171) - \[`pyupgrade`] `UP040`: Upgrades type alias annotations to use PEP-695 syntax by [@zanieb](https://togithub.com/zanieb) in [https://github.com/astral-sh/ruff/pull/6289](https://togithub.com/astral-sh/ruff/pull/6289) ##### Rule Changes - \[`flake8-boolean-trap`] `FBT003`: Add `is_` and `is_not` to excluded functions by [@zanieb](https://togithub.com/zanieb) in [https://github.com/astral-sh/ruff/pull/6307](https://togithub.com/astral-sh/ruff/pull/6307) - \[`flake8-logging-format`] Allow capitalized names for logger candidate heuristic match by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6356](https://togithub.com/astral-sh/ruff/pull/6356) - \[`flake8-pyi`] Applicable rules are now checked non-stub code by [@andersk](https://togithub.com/andersk) in [https://github.com/astral-sh/ruff/pull/6297](https://togithub.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 [@LaBatata101](https://togithub.com/LaBatata101) in [https://github.com/astral-sh/ruff/pull/6354](https://togithub.com/astral-sh/ruff/pull/6354) - \[`pydocstyle`] `D103`: Don't require docstrings in `.pyi` files by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6239](https://togithub.com/astral-sh/ruff/pull/6239) - \[`pydocstyle`] `D203`: Ignore same-line docstrings for lines-before and lines-after rules by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6344](https://togithub.com/astral-sh/ruff/pull/6344) - \[`pylint`] `PLE0605`: Allow generic tuple and list calls in `__all__` by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6247](https://togithub.com/astral-sh/ruff/pull/6247) - \[`pylint`] `PLR0124`: Add detection of comparisons with built-in calls by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6324](https://togithub.com/astral-sh/ruff/pull/6324) - \[`pyupgrade`] `UP032`: Add support for `await` expressions in f-strings by [@harupy](https://togithub.com/harupy) in [https://github.com/astral-sh/ruff/pull/6304](https://togithub.com/astral-sh/ruff/pull/6304) - \[`pyupgrade`] `UP032`: Add support for implicitly concatenated strings by [@harupy](https://togithub.com/harupy) in [https://github.com/astral-sh/ruff/pull/6263](https://togithub.com/astral-sh/ruff/pull/6263) - \[`pyupgrade`] `UP032`: Add support for repeated format fields by [@harupy](https://togithub.com/harupy) in [https://github.com/astral-sh/ruff/pull/6266](https://togithub.com/astral-sh/ruff/pull/6266) - \[`ruff`] `RUF012`: Permit `ClassVar` and `Final` without subscript by [@bluetech](https://togithub.com/bluetech) in [https://github.com/astral-sh/ruff/pull/6273](https://togithub.com/astral-sh/ruff/pull/6273) ##### Bug Fixes - \[`flake8-bugbear`] `B006`: Respect `typing_extensions` imports of `Annotated` by [@PIG208](https://togithub.com/PIG208) in [https://github.com/astral-sh/ruff/pull/6361](https://togithub.com/astral-sh/ruff/pull/6361) - \[`flake8-pyi`] `PYI019`: Fix panic with positional-only arguments by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6350](https://togithub.com/astral-sh/ruff/pull/6350) - \[`flake8-use-pathlib`] Avoid raising `PTH206` with `maxsplit` by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6283](https://togithub.com/astral-sh/ruff/pull/6283) - \[`flake8`] `F841`: Update autofix to not remove Jupyer magic expressions by [@dhruvmanila](https://togithub.com/dhruvmanila) in [https://github.com/astral-sh/ruff/pull/6141](https://togithub.com/astral-sh/ruff/pull/6141) - \[`pycodestyle`] `E721`: Include comparisons to builtin types by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6325](https://togithub.com/astral-sh/ruff/pull/6325) - \[`pycodestyle`] `E721`: Match left-hand side `types()` call in `types-comparison` by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6326](https://togithub.com/astral-sh/ruff/pull/6326) - \[`pyupgrade`] `UP031`: Avoid auto-fixing if there are comments within the right-hand side by [@harupy](https://togithub.com/harupy) in [https://github.com/astral-sh/ruff/pull/6364](https://togithub.com/astral-sh/ruff/pull/6364) - \[`pyupgrade`] `UP032`: Avoid auto-fixing if comments are present around format call arguments by [@harupy](https://togithub.com/harupy) in [https://github.com/astral-sh/ruff/pull/6342](https://togithub.com/astral-sh/ruff/pull/6342) - \[`pyupgrade`] `UP032`: Improve invalid expression check by [@harupy](https://togithub.com/harupy) in [https://github.com/astral-sh/ruff/pull/6308](https://togithub.com/astral-sh/ruff/pull/6308) - Avoid attempting to fix `.format(...)` calls with too-few-arguments by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6401](https://togithub.com/astral-sh/ruff/pull/6401) - Fix bug where `.gitignore` files in parent directories were incorrectly used by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6368](https://togithub.com/astral-sh/ruff/pull/6368) - Fix duplicate violations raised on nested bitwise or `Union` expressions by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6399](https://togithub.com/astral-sh/ruff/pull/6399) ##### Playground - Add a simple tooltip to the sidebar by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6295](https://togithub.com/astral-sh/ruff/pull/6295) - Add an icon for FIR by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6292](https://togithub.com/astral-sh/ruff/pull/6292) - Increase icon opacity on-hover by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6291](https://togithub.com/astral-sh/ruff/pull/6291) - Tweak background on theme button by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6290](https://togithub.com/astral-sh/ruff/pull/6290) ##### Other Changes - Improve handling of violations around Jupyter magic expressions by [@dhruvmanila](https://togithub.com/dhruvmanila) in [https://github.com/astral-sh/ruff/pull/5552](https://togithub.com/astral-sh/ruff/pull/5552) - Reduce memory usage by boxing type params and arguments fields on the class definition node by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6275](https://togithub.com/astral-sh/ruff/pull/6275) - Upgrade Rust to 1.71 by [@zanieb](https://togithub.com/zanieb) in [https://github.com/astral-sh/ruff/pull/6323](https://togithub.com/astral-sh/ruff/pull/6323) #### New Contributors - [@silvanocerza](https://togithub.com/silvanocerza) made their first contribution in [https://github.com/astral-sh/ruff/pull/6171](https://togithub.com/astral-sh/ruff/pull/6171) - [@PIG208](https://togithub.com/PIG208) made their first contribution in [https://github.com/astral-sh/ruff/pull/6361](https://togithub.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://togithub.com/astral-sh/ruff/releases/tag/v0.0.282) [Compare Source](https://togithub.com/astral-sh/ruff/compare/v0.0.281...v0.0.282) #### What's Changed ##### Bug Fixes - Reset model state when exiting deferred visitors by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6208](https://togithub.com/astral-sh/ruff/pull/6208) - Skip trivia when searching for named exception by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6218](https://togithub.com/astral-sh/ruff/pull/6218) - Avoid PERF401 false positive on list access in loop by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6220](https://togithub.com/astral-sh/ruff/pull/6220) - Avoid detecting continuations at non-start-of-line by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6219](https://togithub.com/astral-sh/ruff/pull/6219) - Revert "Expand scope of `quoted-annotation` rule ([#5766](https://togithub.com/astral-sh/ruff/issues/5766))" by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6237](https://togithub.com/astral-sh/ruff/pull/6237) #### New Contributors - [@klistwan](https://togithub.com/klistwan) made their first contribution in [https://github.com/astral-sh/ruff/pull/6146](https://togithub.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://togithub.com/astral-sh/ruff/releases/tag/v0.0.281) [Compare Source](https://togithub.com/astral-sh/ruff/compare/v0.0.280...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 [@LaBatata101](https://togithub.com/LaBatata101) in [https://github.com/astral-sh/ruff/pull/6018](https://togithub.com/astral-sh/ruff/pull/6018) - \[`flake8-pyi`] Implement `PYI047` by [@LaBatata101](https://togithub.com/LaBatata101) in [https://github.com/astral-sh/ruff/pull/6134](https://togithub.com/astral-sh/ruff/pull/6134) - \[`flake8-pyi`] Implement `PYI049` by [@LaBatata101](https://togithub.com/LaBatata101) in [https://github.com/astral-sh/ruff/pull/6136](https://togithub.com/astral-sh/ruff/pull/6136) - \[`flake8-pyi`] Implement `PYI056` by [@LaBatata101](https://togithub.com/LaBatata101) in [https://github.com/astral-sh/ruff/pull/5959](https://togithub.com/astral-sh/ruff/pull/5959) - \[`flake8-pyi`] Implement `PYI046` by [@LaBatata101](https://togithub.com/LaBatata101) in [https://github.com/astral-sh/ruff/pull/6098](https://togithub.com/astral-sh/ruff/pull/6098) - \[`flake8-use-pathlib`] Implement `glob` (`PTH207`) by [@sbrugman](https://togithub.com/sbrugman) in [https://github.com/astral-sh/ruff/pull/5939](https://togithub.com/astral-sh/ruff/pull/5939) - \[`flake8-use-pathlib`] Implement `os-sep-split` (`PTH206`) by [@sbrugman](https://togithub.com/sbrugman) in [https://github.com/astral-sh/ruff/pull/5936](https://togithub.com/astral-sh/ruff/pull/5936) - \[`pycodestyle`] Implement `E241` and `E242` (tab/multiple ws after commas) by [@akx](https://togithub.com/akx) in [https://github.com/astral-sh/ruff/pull/6094](https://togithub.com/astral-sh/ruff/pull/6094) - \[`pylint`] Implement `self-assigning-variable` (`W0127`) by [@tjkuson](https://togithub.com/tjkuson) in [https://github.com/astral-sh/ruff/pull/6015](https://togithub.com/astral-sh/ruff/pull/6015) - \[`pylint`] Implement `eq-without-hash` rule (PLW1641) by [@jelly](https://togithub.com/jelly) in [https://github.com/astral-sh/ruff/pull/5955](https://togithub.com/astral-sh/ruff/pull/5955) - \[`pylint`] Implement `subprocess-popen-preexec-fn` (`W1509`) by [@tjkuson](https://togithub.com/tjkuson) in [https://github.com/astral-sh/ruff/pull/5978](https://togithub.com/astral-sh/ruff/pull/5978) ##### Rule changes - \[`flake8-bugbear`] Extends `B002` to detect unary prefix decrement operators by [@tjkuson](https://togithub.com/tjkuson) in [https://github.com/astral-sh/ruff/pull/5998](https://togithub.com/astral-sh/ruff/pull/5998) - \[`flake8-pytest-style`] Avoid raising PT012 for simple `with` statements by [@harupy](https://togithub.com/harupy) in [https://github.com/astral-sh/ruff/pull/6081](https://togithub.com/astral-sh/ruff/pull/6081) - \[`flake8-pytest-style`] Allow pytest.raises body to contain a single func or class definition by [@harupy](https://togithub.com/harupy) in [https://github.com/astral-sh/ruff/pull/6083](https://togithub.com/astral-sh/ruff/pull/6083) - \[`flake8-simplify`] Extend SIM118 with `not in` by [@sbrugman](https://togithub.com/sbrugman) in [https://github.com/astral-sh/ruff/pull/5995](https://togithub.com/astral-sh/ruff/pull/5995) - \[`perflint`] Skip `PERF203` violations for multi-statement loops by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6145](https://togithub.com/astral-sh/ruff/pull/6145) - \[`pyupgrade`] Add support for `int`, `float`, `bool` in `UP018` by [@dhruvmanila](https://togithub.com/dhruvmanila) in [https://github.com/astral-sh/ruff/pull/6013](https://togithub.com/astral-sh/ruff/pull/6013) - \[`tryceratops`] Add suggested fix for `TRY201` by [@dhruvmanila](https://togithub.com/dhruvmanila) in [https://github.com/astral-sh/ruff/pull/6008](https://togithub.com/astral-sh/ruff/pull/6008) ##### Settings - Allow specification of `logging.Logger` re-exports via `logger-objects` by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5750](https://togithub.com/astral-sh/ruff/pull/5750) - Set default `max-complexity` to 10 for empty McCabe settings by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6073](https://togithub.com/astral-sh/ruff/pull/6073) - \[`pep8-naming`]: New config option `extend-ignore-names` by [@dhruvmanila](https://togithub.com/dhruvmanila) in [https://github.com/astral-sh/ruff/pull/6169](https://togithub.com/astral-sh/ruff/pull/6169) ##### Bug Fixes - Avoid raising `UP032` if `format` call arguments contain multiline expressions by [@harupy](https://togithub.com/harupy) in [https://github.com/astral-sh/ruff/pull/5971](https://togithub.com/astral-sh/ruff/pull/5971) - Fix `F507` false positive by [@harupy](https://togithub.com/harupy) in [https://github.com/astral-sh/ruff/pull/5986](https://togithub.com/astral-sh/ruff/pull/5986) - Fix logging rules with whitespace around dot by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6022](https://togithub.com/astral-sh/ruff/pull/6022) - Ignore end-of-line comments when dirtying if-with-same-arms branches by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6031](https://togithub.com/astral-sh/ruff/pull/6031) - Avoid treating `Literal` members as expressions with `__future__` by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6032](https://togithub.com/astral-sh/ruff/pull/6032) - Avoid refactoring `x[:1]`-like slices in RUF015 by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6150](https://togithub.com/astral-sh/ruff/pull/6150) - Avoid key-in-dict violations for `self` accesses by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6165](https://togithub.com/astral-sh/ruff/pull/6165) - Avoid falsely marking non-submodules as submodule aliases by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6182](https://togithub.com/astral-sh/ruff/pull/6182) - Flag `[` as an invalid noqa suffix by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5982](https://togithub.com/astral-sh/ruff/pull/5982) - Ignore some common builtin overrides on standard library subclasses by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6074](https://togithub.com/astral-sh/ruff/pull/6074) - Avoid A003 violations for explicitly overridden methods by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6076](https://togithub.com/astral-sh/ruff/pull/6076) - Include file permissions in key for cached files by [@zanieb](https://togithub.com/zanieb) in [https://github.com/astral-sh/ruff/pull/5901](https://togithub.com/astral-sh/ruff/pull/5901) - Ignore `explicit-string-concatenation` on single line by [@tjkuson](https://togithub.com/tjkuson) in [https://github.com/astral-sh/ruff/pull/6028](https://togithub.com/astral-sh/ruff/pull/6028) - Fix `SIM102` to handle indented `elif` by [@harupy](https://togithub.com/harupy) in [https://github.com/astral-sh/ruff/pull/6072](https://togithub.com/astral-sh/ruff/pull/6072) - Raise `PTH201` for `Path("")` by [@harupy](https://togithub.com/harupy) in [https://github.com/astral-sh/ruff/pull/6095](https://togithub.com/astral-sh/ruff/pull/6095) - Update `SIM115` to cover `pathlib.Path.open` by [@harupy](https://togithub.com/harupy) in [https://github.com/astral-sh/ruff/pull/611](https://togithub.com/astral-sh/ruff/pull/611) - Ignore end-of-line file exemption comments by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6160](https://togithub.com/astral-sh/ruff/pull/6160) - Implement `--diff` for Jupyter Notebooks by [@dhruvmanila](https://togithub.com/dhruvmanila) in [https://github.com/astral-sh/ruff/pull/6149](https://togithub.com/astral-sh/ruff/pull/6149) - Skip BOM when determining Locator's line starts by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6159](https://togithub.com/astral-sh/ruff/pull/6159) - Avoid parenthesizing comprehension element by [@dhruvmanila](https://togithub.com/dhruvmanila) in [https://github.com/astral-sh/ruff/pull/6198](https://togithub.com/astral-sh/ruff/pull/6198) - Do not raise `SIM105` for non-exceptions by [@sbrugman](https://togithub.com/sbrugman) in [https://github.com/astral-sh/ruff/pull/5985](https://togithub.com/astral-sh/ruff/pull/5985) #### New Contributors - [@AlexWaygood](https://togithub.com/AlexWaygood) made their first contribution in [https://github.com/astral-sh/ruff/pull/5973](https://togithub.com/astral-sh/ruff/pull/5973) - [@RMPR](https://togithub.com/RMPR) made their first contribution in [https://github.com/astral-sh/ruff/pull/6048](https://togithub.com/astral-sh/ruff/pull/6048) - [@arembridge](https://togithub.com/arembridge) made their first contribution in [https://github.com/astral-sh/ruff/pull/6079](https://togithub.com/astral-sh/ruff/pull/6079) - [@Eutropios](https://togithub.com/Eutropios) made their first contribution in [https://github.com/astral-sh/ruff/pull/6082](https://togithub.com/astral-sh/ruff/pull/6082) - [@jelly](https://togithub.com/jelly) made their first contribution in [https://github.com/astral-sh/ruff/pull/5955](https://togithub.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://togithub.com/astral-sh/ruff/releases/tag/v0.0.280) [Compare Source](https://togithub.com/astral-sh/ruff/compare/v0.0.279...v0.0.280) #### What's Changed ##### Bug Fixes - Avoid collapsing `elif` and `else` branches during import sorting by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5964](https://togithub.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://togithub.com/astral-sh/ruff/releases/tag/v0.0.279) [Compare Source](https://togithub.com/astral-sh/ruff/compare/v0.0.278...v0.0.279) #### What's Changed ##### Rules - \[`flake8-pyi`] Implement flake8-pyi's PYI026 by [@LaBatata101](https://togithub.com/LaBatata101) in [https://github.com/astral-sh/ruff/pull/5844](https://togithub.com/astral-sh/ruff/pull/5844) - \[`flake8-pyi`] Implement flake8-pyi's `PYI017` by [@qdegraaf](https://togithub.com/qdegraaf) in [https://github.com/astral-sh/ruff/pull/5895](https://togithub.com/astral-sh/ruff/pull/5895) - \[`flake8-pyi`] Implement flake8-pyi's `PYI036` by [@density](https://togithub.com/density) in [https://github.com/astral-sh/ruff/pull/5668](https://togithub.com/astral-sh/ruff/pull/5668) - \[`flake8-pyi`] Implement flake8-pyi's `PYI041` by [@density](https://togithub.com/density) in [https://github.com/astral-sh/ruff/pull/5722](https://togithub.com/astral-sh/ruff/pull/5722) - \[`flake8-use-pathlib`] Implement `os-path-getsize` and `os-path-get(a|m|c)-time` (`PTH202-205`) by [@sbrugman](https://togithub.com/sbrugman) in [https://github.com/astral-sh/ruff/pull/5835](https://togithub.com/astral-sh/ruff/pull/5835) - \[`flake8-use-pathlib`] Implement `path-constructor-default-argument` (`PTH201`) by [@sbrugman](https://togithub.com/sbrugman) in [https://github.com/astral-sh/ruff/pull/5833](https://togithub.com/astral-sh/ruff/pull/5833) - \[`pandas-vet`] Implement constant series rule (`PD101`) by [@sbrugman](https://togithub.com/sbrugman) in [https://github.com/astral-sh/ruff/pull/5802](https://togithub.com/astral-sh/ruff/pull/5802) - \[`pylint`] Implement Pylint's `consider-using-in` (`PLR1714`) by [@tjkuson](https://togithub.com/tjkuson) in [https://github.com/astral-sh/ruff/pull/5193](https://togithub.com/astral-sh/ruff/pull/5193) ##### Rule changes - \[`flake8-annotations`] Check for `Any` in other types for `ANN401` by [@dhruvmanila](https://togithub.com/dhruvmanila) in [https://github.com/astral-sh/ruff/pull/5601](https://togithub.com/astral-sh/ruff/pull/5601) - \[`flake8-bugbear`] Add autofix for B004 by [@density](https://togithub.com/density) in [https://github.com/astral-sh/ruff/pull/5788](https://togithub.com/astral-sh/ruff/pull/5788) - \[`flake8-bugbear`] Remove `B904`'s lowercase exemption by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5751](https://togithub.com/astral-sh/ruff/pull/5751) - \[`flake8-use-pathlib`] extend PTH118 with `os.sep` by [@sbrugman](https://togithub.com/sbrugman) in [https://github.com/astral-sh/ruff/pull/5935](https://togithub.com/astral-sh/ruff/pull/5935) - \[`pyupgrade`] Expand scope of `quoted-annotation` rule (`UP037`) by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5766](https://togithub.com/astral-sh/ruff/pull/5766) - \[`pyupgrade`] Extend PEP 604 rewrites to support some quoted annotations by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5725](https://togithub.com/astral-sh/ruff/pull/5725) - \[`ruff`] Expand `RUF015` to include all expression types by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5767](https://togithub.com/astral-sh/ruff/pull/5767) ##### Bug Fixes - Consider single element subscript expr for implicit optional by [@dhruvmanila](https://togithub.com/dhruvmanila) in [https://github.com/astral-sh/ruff/pull/5717](https://togithub.com/astral-sh/ruff/pull/5717) - Ignore `Enum`-and-`str` subclasses for slots enforcement by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5749](https://togithub.com/astral-sh/ruff/pull/5749) - Avoid removing raw strings in comparison fixes by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5755](https://togithub.com/astral-sh/ruff/pull/5755) - Fix nested calls to `sorted` with differing arguments by [@density](https://togithub.com/density) in [https://github.com/astral-sh/ruff/pull/5761](https://togithub.com/astral-sh/ruff/pull/5761) - Use unused variable detection to power `incorrect-dict-iterator` by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5763](https://togithub.com/astral-sh/ruff/pull/5763) - Include alias when formatting import-from structs by [@guillaumeLepape](https://togithub.com/guillaumeLepape) in [https://github.com/astral-sh/ruff/pull/5786](https://togithub.com/astral-sh/ruff/pull/5786) - Make `lint_only` aware of the source kind by [@dhruvmanila](https://togithub.com/dhruvmanila) in [https://github.com/astral-sh/ruff/pull/5876](https://togithub.com/astral-sh/ruff/pull/5876) - Restore `redefined-while-unused` violations in classes by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5926](https://togithub.com/astral-sh/ruff/pull/5926) - Flatten nested tuples when fixing UP007 violations by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5724](https://togithub.com/astral-sh/ruff/pull/5724) - Ignore Jupyter Notebooks for `--add-noqa` by [@dhruvmanila](https://togithub.com/dhruvmanila) in [https://github.com/astral-sh/ruff/pull/5727](https://togithub.com/astral-sh/ruff/pull/5727) - Avoid checking `EXE001` and `EXE002` on WSL by [@tjkuson](https://togithub.com/tjkuson) in [https://github.com/astral-sh/ruff/pull/5735](https://togithub.com/astral-sh/ruff/pull/5735) - Properly group assignment targets by [@MichaReiser](https://togithub.com/MichaReiser) in [https://github.com/astral-sh/ruff/pull/5728](https://togithub.com/astral-sh/ruff/pull/5728) - Avoid stack overflow for non-BitOr binary types by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5743](https://togithub.com/astral-sh/ruff/pull/5743) - Move function visit out of `Expr::Call` branches by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5772](https://togithub.com/astral-sh/ruff/pull/5772) - \[B006] Add bytes to immutable types by [@harupy](https://togithub.com/harupy) in [https://github.com/astral-sh/ruff/pull/5776](https://togithub.com/astral-sh/ruff/pull/5776) - Format `SetComp` by [@lkh42t](https://togithub.com/lkh42t) in [https://github.com/astral-sh/ruff/pull/5774](https://togithub.com/astral-sh/ruff/pull/5774) - Gate `runtime-import-in-type-checking-block` (`TCH004`) behind enabled flag by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5789](https://togithub.com/astral-sh/ruff/pull/5789) - perf: only compute start offset for overlong lines by [@sbrugman](https://togithub.com/sbrugman) in [https://github.com/astral-sh/ruff/pull/5811](https://togithub.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 [@tjkuson](https://togithub.com/tjkuson) in [https://github.com/astral-sh/ruff/pull/5807](https://togithub.com/astral-sh/ruff/pull/5807) - Do not fix `NamedTuple` calls containing both a list of fields and keywords by [@harupy](https://togithub.com/harupy) in [https://github.com/astral-sh/ruff/pull/5799](https://togithub.com/astral-sh/ruff/pull/5799) - Ignore directories when collecting files to lint by [@harupy](https://togithub.com/harupy) in [https://github.com/astral-sh/ruff/pull/5775](https://togithub.com/astral-sh/ruff/pull/5775) - Add filename to `noqa` warnings by [@sobolevn](https://togithub.com/sobolevn) in [https://github.com/astral-sh/ruff/pull/5856](https://togithub.com/astral-sh/ruff/pull/5856) - Handle io errors gracefully by [@konstin](https://togithub.com/konstin) in [https://github.com/astral-sh/ruff/pull/5611](https://togithub.com/astral-sh/ruff/pull/5611) - Allow `respect_gitignore` when not in a git repo by [@dhruvmanila](https://togithub.com/dhruvmanila) in [https://github.com/astral-sh/ruff/pull/5937](https://togithub.com/astral-sh/ruff/pull/5937) #### New Contributors - [@eggplants](https://togithub.com/eggplants) made their first contribution in [https://github.com/astral-sh/ruff/pull/5741](https://togithub.com/astral-sh/ruff/pull/5741) - [@guillaumeLepape](https://togithub.com/guillaumeLepape) made their first contribution in [https://github.com/astral-sh/ruff/pull/5786](https://togithub.com/astral-sh/ruff/pull/5786) - [@odiseo0](https://togithub.com/odiseo0) made their first contribution in [https://github.com/astral-sh/ruff/pull/5888](https://togithub.com/astral-sh/ruff/pull/5888) - [@DavidCain](https://togithub.com/DavidCain) made their first contribution in [https://github.com/astral-sh/ruff/pull/5889](https://togithub.com/astral-sh/ruff/pull/5889) - [@LaBatata101](https://togithub.com/LaBatata101) made their first contribution in [https://github.com/astral-sh/ruff/pull/5844](https://togithub.com/astral-sh/ruff/pull/5844) **Full Changelog**: https://github.com/astral-sh/ruff/compare/v0.0.278...v0.0.279 ### [`v0.0.278`](https://togithub.com/astral-sh/ruff/releases/tag/v0.0.278) [Compare Source](https://togithub.com/astral-sh/ruff/compare/v0.0.277...v0.0.278) See the [release blog post](https://astral.sh/blog/ruff-v0.0.278) for more, including detailed descriptions of any newly added rules. #### What's Changed ##### Rules - \[`pylint`] Implement `typevar-bivariance` (`PLC0131`) by [@tjkuson](https://togithub.com/tjkuson) in [https://github.com/astral-sh/ruff/pull/5517](https://togithub.com/astral-sh/ruff/pull/5517) - \[`flake8-pyi`] Implement `unnecessary-literal-union` (`PYI030`) by [@zanieb](https://togithub.com/zanieb) in [https://github.com/astral-sh/ruff/pull/5570](https://togithub.com/astral-sh/ruff/pull/5570) - \[`pylint`] Implement `type-name-incorrect-variance` (`PLC0105`) by [@tjkuson](https://togithub.com/tjkuson) in [https://github.com/astral-sh/ruff/pull/5651](https://togithub.com/astral-sh/ruff/pull/5651) - \[`ruff`] Implement `unnecessary-list-allocation-for-first-element` (`RUF015`) by [@evanrittenhouse](https://togithub.com/evanrittenhouse) in [https://github.com/astral-sh/ruff/pull/5549](https://togithub.com/astral-sh/ruff/pull/5549) - \[`flake8-bugbear`] Implement `re-sub-positional-args` (`B034`) by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5669](https://togithub.com/astral-sh/ruff/pull/5669) - \[`ruff`] Implement `invalid-index-type` (`RUF016`) by [@zanieb](https://togithub.com/zanieb) in [https://github.com/astral-sh/ruff/pull/5602](https://togithub.com/astral-sh/ruff/pull/5602) ##### Settings - \[`isort`] Add `--case-sensitive` flag by [@qdegraaf](https://togithub.com/qdegraaf) in [https://github.com/astral-sh/ruff/pull/5539](https://togithub.com/astral-sh/ruff/pull/5539) - \[`isort`] Support globbing in `isort` options by [@tjkuson](https://togithub.com/tjkuson) in [https://github.com/astral-sh/ruff/pull/5473](https://togithub.com/astral-sh/ruff/pull/5473) ##### Bug Fixes - Support autofix for some multiline `str.format` calls by [@harupy](https://togithub.com/harupy) in [https://github.com/astral-sh/ruff/pull/5638](https://togithub.com/astral-sh/ruff/pull/5638) - Avoid triggering `unnecessary-map` (`C417`) for late-bound lambdas by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5520](httConfiguration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.