ruff/crates/ruff_linter/src/rules
w0nder1ng 4a7536dc94
[perflint] Fix panic in perf401 (#14971)
Fixes #14969.

The issue was that this line:

```rust
let from_assign_to_loop = TextRange::new(binding_stmt.end(), for_stmt.start());
```

was not safe if the binding was after the target. The only way (at least
that I can think of) this can happen is if they are in different scopes,
so it now checks for that before checking if there are usages between
the two.
2024-12-15 16:22:04 +01:00
..
airflow [airflow]: Import modules that has been moved to airflow providers (AIR303) (#14764) 2024-12-13 10:38:07 +01:00
eradicate Use a derive macro for Violations (#14557) 2024-11-27 09:41:40 +00:00
fastapi More typos found by codespell (#14880) 2024-12-09 22:47:34 +00:00
flake8_2020 Use a derive macro for Violations (#14557) 2024-11-27 09:41:40 +00:00
flake8_annotations Reference suppress-dummy-regex-options in documentation of rules supporting it (#14888) 2024-12-10 09:53:53 +00:00
flake8_async Fix references for async-busy-wait (#14775) 2024-12-04 18:05:49 +01:00
flake8_bandit [refurb] Guard hashlib imports and mark hashlib-digest-hex fix as safe (FURB181) (#14694) 2024-12-01 20:24:49 -05:00
flake8_blind_except Use a derive macro for Violations (#14557) 2024-11-27 09:41:40 +00:00
flake8_boolean_trap Use a derive macro for Violations (#14557) 2024-11-27 09:41:40 +00:00
flake8_bugbear [flake8-bugbear] itertools.batched() without explicit strict (B911) (#14408) 2024-12-10 08:39:46 +00:00
flake8_builtins Use a derive macro for Violations (#14557) 2024-11-27 09:41:40 +00:00
flake8_commas [flake8-commas]: Fix example replacement in docs (#14843) 2024-12-09 00:51:59 +00:00
flake8_comprehensions [flake8-comprehensions] Skip iterables with named expressions in unnecessary-map (C417) (#14827) 2024-12-06 22:00:33 -05:00
flake8_copyright Use a derive macro for Violations (#14557) 2024-11-27 09:41:40 +00:00
flake8_datetimez Use a derive macro for Violations (#14557) 2024-11-27 09:41:40 +00:00
flake8_debugger Use a derive macro for Violations (#14557) 2024-11-27 09:41:40 +00:00
flake8_django Use a derive macro for Violations (#14557) 2024-11-27 09:41:40 +00:00
flake8_errmsg Use a derive macro for Violations (#14557) 2024-11-27 09:41:40 +00:00
flake8_executable Use a derive macro for Violations (#14557) 2024-11-27 09:41:40 +00:00
flake8_fixme Use a derive macro for Violations (#14557) 2024-11-27 09:41:40 +00:00
flake8_future_annotations Use a derive macro for Violations (#14557) 2024-11-27 09:41:40 +00:00
flake8_gettext Use a derive macro for Violations (#14557) 2024-11-27 09:41:40 +00:00
flake8_implicit_str_concat Use a derive macro for Violations (#14557) 2024-11-27 09:41:40 +00:00
flake8_import_conventions Use a derive macro for Violations (#14557) 2024-11-27 09:41:40 +00:00
flake8_logging Use a derive macro for Violations (#14557) 2024-11-27 09:41:40 +00:00
flake8_logging_format Use a derive macro for Violations (#14557) 2024-11-27 09:41:40 +00:00
flake8_no_pep420 Use a derive macro for Violations (#14557) 2024-11-27 09:41:40 +00:00
flake8_pie Use a derive macro for Violations (#14557) 2024-11-27 09:41:40 +00:00
flake8_print Use a derive macro for Violations (#14557) 2024-11-27 09:41:40 +00:00
flake8_pyi [flake8-pyi]: More autofixes for redundant-none-literal (PYI061) (#14872) 2024-12-12 19:44:32 +00:00
flake8_pytest_style Fix pytest-parametrize-names-wrong-type (PT006) to edit both argnames and argvalues if both of them are single-element tuples/lists (#14699) 2024-12-09 09:58:52 +01:00
flake8_quotes Use a derive macro for Violations (#14557) 2024-11-27 09:41:40 +00:00
flake8_raise Use a derive macro for Violations (#14557) 2024-11-27 09:41:40 +00:00
flake8_return Upgrade Rust toolchain to 1.83 (#14677) 2024-11-29 12:05:05 +00:00
flake8_self Use a derive macro for Violations (#14557) 2024-11-27 09:41:40 +00:00
flake8_simplify Use a derive macro for Violations (#14557) 2024-11-27 09:41:40 +00:00
flake8_slots Use a derive macro for Violations (#14557) 2024-11-27 09:41:40 +00:00
flake8_tidy_imports Use a derive macro for Violations (#14557) 2024-11-27 09:41:40 +00:00
flake8_todos Use a derive macro for Violations (#14557) 2024-11-27 09:41:40 +00:00
flake8_type_checking [flake8-type-checking] Expands TC006 docs to better explain itself (#14749) 2024-12-04 13:16:31 +00:00
flake8_unused_arguments Use a derive macro for Violations (#14557) 2024-11-27 09:41:40 +00:00
flake8_use_pathlib [flake8-use-pathlib] Extend check for invalid path suffix to include the case "." (PTH210) (#14902) 2024-12-12 13:30:17 -06:00
flynt Use a derive macro for Violations (#14557) 2024-11-27 09:41:40 +00:00
isort Upgrade Rust toolchain to 1.83 (#14677) 2024-11-29 12:05:05 +00:00
mccabe Use a derive macro for Violations (#14557) 2024-11-27 09:41:40 +00:00
numpy Use a derive macro for Violations (#14557) 2024-11-27 09:41:40 +00:00
pandas_vet Skip panda rules if panda module hasn't been seen (#14671) 2024-11-29 21:32:51 +00:00
pep8_naming [pep8-naming] Avoid false positive for class Bar(type(foo)) (N804) (#14683) 2024-11-30 22:37:28 +00:00
perflint [perflint] Fix panic in perf401 (#14971) 2024-12-15 16:22:04 +01:00
pycodestyle Improve the documentation of E201/E202 (#14983) 2024-12-15 16:20:04 +01:00
pydoclint Fix typos found by codespell (#14863) 2024-12-09 09:32:12 +00:00
pydocstyle Upgrade Rust toolchain to 1.83 (#14677) 2024-11-29 12:05:05 +00:00
pyflakes Revert: [pyflakes] Avoid false positives in @no_type_check contexts (F821, F722) (#14615) (#14726) 2024-12-02 14:28:27 +01:00
pygrep_hooks Use a derive macro for Violations (#14557) 2024-11-27 09:41:40 +00:00
pylint [pylint] Include parentheses and multiple comparators in check for boolean-chained-comparison (PLR1716) (#14781) 2024-12-08 22:58:45 -06:00
pyupgrade [pyupgrade] Do not report when a UTF-8 comment is followed by a non-UTF-8 one (UP009) (#14728) 2024-12-11 10:30:41 +00:00
refurb [refurb] Handle non-finite decimals in verbose-decimal-constructor (FURB157) (#14596) 2024-12-02 18:13:20 -06:00
ruff [ruff] Skip SQLModel base classes for mutable-class-default (RUF012) (#14949) 2024-12-12 22:19:21 -06:00
tryceratops Upgrade Rust toolchain to 1.83 (#14677) 2024-11-29 12:05:05 +00:00
mod.rs Re-enable clippy useless-format (#14095) 2024-11-04 18:25:25 +01:00