ruff/crates/ruff_linter/resources/test/fixtures/ruff
Max Mynter a01f25107a
[`pyupgrade`] Preserve parenthesis when fixing native literals containing newlines (`UP018`) (#17220)
2025-04-24 08:48:02 +02:00
..
pyproject_toml Update pyproject-toml to support PEP 639 (#13902) 2024-11-20 13:11:51 +01:00
.editorconfig [`pyupgrade`] Preserve parenthesis when fixing native literals containing newlines (`UP018`) (#17220) 2025-04-24 08:48:02 +02:00
RUF005.py Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
RUF005_slices.py [`ruff`] Support slices in `RUF005` (#17078) 2025-03-31 09:09:39 -04:00
RUF006.py Add test cases for `RUF006` with lambdas (#13628) 2024-10-04 14:09:43 -05:00
RUF007.py Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
RUF008.py [`ruff`] Analyze deferred annotations before enforcing `mutable-(data)class-default` and `function-call-in-dataclass-default-argument` (`RUF008`,`RUF009`,`RUF012`) (#15921) 2025-02-05 06:44:19 -06:00
RUF008_attrs.py [`ruff`] Also report problems for `attrs` dataclasses in preview mode (`RUF008`, `RUF009`) (#14327) 2024-11-14 15:13:49 +00:00
RUF008_deferred.py [`ruff`] Analyze deferred annotations before enforcing `mutable-(data)class-default` and `function-call-in-dataclass-default-argument` (`RUF008`,`RUF009`,`RUF012`) (#15921) 2025-02-05 06:44:19 -06:00
RUF009.py RUF009 should behave similar to B008 and ignore attributes with immutable types (#16048) 2025-02-10 09:46:23 +01:00
RUF009_attrs.py [`ruff`] Also report problems for `attrs` dataclasses in preview mode (`RUF008`, `RUF009`) (#14327) 2024-11-14 15:13:49 +00:00
RUF009_attrs_auto_attribs.py Use truthiness check in `auto_attribs` detection (#14562) 2024-11-23 22:06:10 -05:00
RUF009_deferred.py [`ruff`] Analyze deferred annotations before enforcing `mutable-(data)class-default` and `function-call-in-dataclass-default-argument` (`RUF008`,`RUF009`,`RUF012`) (#15921) 2025-02-05 06:44:19 -06:00
RUF010.py Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
RUF012.py [`ruff`] Add more Pydantic models variants to the list of default copy semantics (`RUF012`) (#16291) 2025-02-21 08:28:13 +01:00
RUF012_deferred.py [`ruff`] Analyze deferred annotations before enforcing `mutable-(data)class-default` and `function-call-in-dataclass-default-argument` (`RUF008`,`RUF009`,`RUF012`) (#15921) 2025-02-05 06:44:19 -06:00
RUF013_0.py Avoid failures due to non-deterministic binding ordering (#10478) 2024-03-19 18:01:33 +00:00
RUF013_1.py Avoid failures due to non-deterministic binding ordering (#10478) 2024-03-19 18:01:33 +00:00
RUF013_2.py Treat all `typing_extensions` members as typing aliases (#9335) 2023-12-31 14:23:33 -04:00
RUF013_3.py Avoid failures due to non-deterministic binding ordering (#10478) 2024-03-19 18:01:33 +00:00
RUF013_4.py [`ruff`] Do not report when `Optional` has no type arguments (`RUF013`) (#14181) 2024-11-09 08:48:56 -05:00
RUF015.py [`ruff`] Expand rule for `list(iterable).pop(0)` idiom (`RUF015`) (#10148) 2024-02-28 00:24:28 +00:00
RUF016.py Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
RUF017_0.py Perform insertions before replacements (#7739) 2023-10-01 14:53:54 +00:00
RUF017_1.py Perform insertions before replacements (#7739) 2023-10-01 14:53:54 +00:00
RUF018.py [`ruff`] Avoid emitting `assignment-in-assert` when all references to the assigned variable are themselves inside `assert`s (`RUF018`) (#14661) 2024-11-29 13:36:59 +00:00
RUF019.py Treat `not` operations as boolean tests (#12301) 2024-07-12 08:53:37 -04:00
RUF020.py [`ruff`] Improve autofix safety for `never-union` (RUF020) (#14589) 2024-11-25 18:35:07 +01:00
RUF021.py Spellcheck & grammar (#10375) 2024-03-13 02:34:23 +00:00
RUF022.py Spellcheck & grammar (#10375) 2024-03-13 02:34:23 +00:00
RUF023.py [`ruff`] Mark `RUF023` fix as unsafe if `__slots__` is not a set and the binding is used elsewhere (#12692) 2024-08-07 10:41:03 +01:00
RUF024.py Improve handling of builtin symbols in linter rules (#10919) 2024-04-16 11:37:31 +01:00
RUF026.py Stabilise rules RUF024 and RUF026 (#12026) 2024-06-27 13:44:11 +02:00
RUF027_0.py [`ruff`] Skip type definitions for `missing-f-string-syntax` (`RUF027`) (#16054) 2025-02-09 10:16:28 -06:00
RUF027_1.py [`ruff`] Avoid false positives for RUF027 for typing context bindings. (#15037) 2024-12-18 08:50:49 +01:00
RUF027_2.py Fix panic on RUF027 (#9990) 2024-02-16 20:04:39 +00:00
RUF028.py [`ruff`] - fix false positive for decorators (`RUF028`) (#14061) 2024-11-03 11:49:03 +00:00
RUF029.py Use TypeChecker for detecting fastapi routes (#15093) 2024-12-21 15:45:28 +01:00
RUF030.py [`ruff`] Add `assert-with-print-expression` rule (#11974) (#11981) 2024-06-23 16:54:55 +00:00
RUF031.py [`ruff`] Skip singleton starred expressions for `incorrectly-parenthesized-tuple-in-subscript` (`RUF031`) (#16083) 2025-02-10 11:30:07 -06:00
RUF031_prefer_parens.py [`ruff`] Skip singleton starred expressions for `incorrectly-parenthesized-tuple-in-subscript` (`RUF031`) (#16083) 2025-02-10 11:30:07 -06:00
RUF032.py [`ruff`] Handle unary operators in `decimal-from-float-literal (RUF032)` (#13275) 2024-09-07 13:25:49 +00:00
RUF033.py [`ruff`] Implement post-init-default (`RUF033`) (#13192) 2024-09-02 13:10:55 +01:00
RUF034.py [ruff] implement useless if-else (RUF034) (#13218) 2024-09-04 08:22:17 +02:00
RUF036.py [`ruff`] Implement `none-not-at-end-of-union` (`RUF036`) (#14314) 2024-11-14 19:37:13 +01:00
RUF036.pyi [`ruff`] Implement `none-not-at-end-of-union` (`RUF036`) (#14314) 2024-11-14 19:37:13 +01:00
RUF037.py [`ruff`] Recode `RUF025` to `RUF037` (`RUF037`) (#15258) 2025-01-05 09:35:08 +01:00
RUF038.py [`ruff`] Implement `redundant-bool-literal` (`RUF038`) (#14319) 2024-11-16 21:52:51 +00:00
RUF038.pyi [`ruff`] Implement `redundant-bool-literal` (`RUF038`) (#14319) 2024-11-16 21:52:51 +00:00
RUF039.py [`ruff`] `re` and `regex` calls with unraw string as first argument (`RUF039`) (#14446) 2024-11-19 13:44:55 +01:00
RUF039_concat.py [`ruff`] `re` and `regex` calls with unraw string as first argument (`RUF039`) (#14446) 2024-11-19 13:44:55 +01:00
RUF040.py [`ruff`] Implement `invalid-assert-message-literal-argument` (`RUF040`) (#14488) 2024-11-25 17:41:07 -06:00
RUF041.py Fix typos found by codespell (#14863) 2024-12-09 09:32:12 +00:00
RUF041.pyi Fix typos found by codespell (#14863) 2024-12-09 09:32:12 +00:00
RUF043.py [`ruff`] Treat `)` as a regex metacharacter (`RUF043`, `RUF055`) (#15318) 2025-01-07 12:11:05 -05:00
RUF045.py [`ruff`] Implicit class variable in dataclass (`RUF045`) (#14349) 2025-02-15 09:08:13 -06:00
RUF046.py [`ruff`] Parenthesize arguments to `int` when removing `int` would change semantics in `unnecessary-cast-to-int` (`RUF046`) (#15277) 2025-01-07 21:43:50 +00:00
RUF046_CR.py [`pyupgrade`] Preserve parenthesis when fixing native literals containing newlines (`UP018`) (#17220) 2025-04-24 08:48:02 +02:00
RUF046_LF.py [`pyupgrade`] Preserve parenthesis when fixing native literals containing newlines (`UP018`) (#17220) 2025-04-24 08:48:02 +02:00
RUF047_for.py [`ruff`] Needless `else` clause (`RUF047`) (#15051) 2025-01-21 08:21:19 +00:00
RUF047_if.py [`ruff`] Needless `else` clause (`RUF047`) (#15051) 2025-01-21 08:21:19 +00:00
RUF047_try.py [`ruff`] Needless `else` clause (`RUF047`) (#15051) 2025-01-21 08:21:19 +00:00
RUF047_while.py [`ruff`] Needless `else` clause (`RUF047`) (#15051) 2025-01-21 08:21:19 +00:00
RUF048.py [`ruff`] Add rule forbidding `map(int, package.__version__.split('.'))` (`RUF048`) (#14373) 2024-11-18 13:43:24 +00:00
RUF048_1.py [`ruff`] Add rule forbidding `map(int, package.__version__.split('.'))` (`RUF048`) (#14373) 2024-11-18 13:43:24 +00:00
RUF049.py [`ruff`] Dataclass enums (`RUF049`) (#15299) 2025-01-06 14:44:20 +01:00
RUF051.py [`ruff`] `if k in d: del d[k]` (`RUF051`) (#14553) 2024-12-11 11:12:23 +00:00
RUF052.py [`pyupgrade`] [`ruff`] Don't apply renamings if the new name is shadowed in a scope of one of the references to the binding (`UP049`, `RUF052`) (#16032) 2025-02-08 11:25:23 +00:00
RUF053.py [`ruff`] Classes with mixed type variable style (`RUF053`) (#15841) 2025-02-06 18:35:51 +00:00
RUF054.py [`ruff`] Indented form feeds (`RUF054`) (#16049) 2025-02-09 19:23:48 -05:00
RUF055_0.py [`ruff`] Add support for more `re` patterns (`RUF055`) (#15764) 2025-01-29 10:14:44 -05:00
RUF055_1.py [`ruff`] Extend unnecessary-regular-expression to non-literal strings (`RUF055`) (#14679) 2024-12-03 15:17:20 +00:00
RUF055_2.py [`ruff`] Add support for more `re` patterns (`RUF055`) (#15764) 2025-01-29 10:14:44 -05:00
RUF056.py [ruff] Implement falsy-dict-get-fallback (RUF056) (#15160) 2024-12-31 11:40:51 +01:00
RUF057.py [`ruff`] Parenthesize fix when argument spans multiple lines for `unnecessary-round` (`RUF057`) (#15703) 2025-01-24 04:34:56 -06:00
RUF058_0.py [`ruff`] Check for shadowed `map` before suggesting fix (`RUF058`) (#15790) 2025-01-28 14:15:37 -05:00
RUF058_1.py [`ruff`] Check for shadowed `map` before suggesting fix (`RUF058`) (#15790) 2025-01-28 14:15:37 -05:00
RUF059_0.py Add new rule RUF059: Unused unpacked assignment (#16449) 2025-03-03 10:51:36 +01:00
RUF059_1.py Add new rule RUF059: Unused unpacked assignment (#16449) 2025-03-03 10:51:36 +01:00
RUF059_2.py Add new rule RUF059: Unused unpacked assignment (#16449) 2025-03-03 10:51:36 +01:00
RUF059_3.py Add new rule RUF059: Unused unpacked assignment (#16449) 2025-03-03 10:51:36 +01:00
RUF100_0.py Fix a few typos found by codespell (#11404) 2024-05-13 13:22:35 +00:00
RUF100_1.py Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
RUF100_2.py Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
RUF100_3.py Avoid parsing joint rule codes as distinct codes in `# noqa` (#12809) 2024-11-02 20:24:59 +00:00
RUF100_4.py Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
RUF100_5.py [`ruff`] - extend comment deletions for unused-noqa (`RUF100`) (#13105) 2024-08-29 10:50:16 +05:30
RUF100_6.py Fix RUF100 to detect unused file-level noqa directives with specific codes (#17042) (#17061) 2025-04-07 09:21:52 -05:00
RUF100_7.py Fix RUF100 to detect unused file-level noqa directives with specific codes (#17042) (#17061) 2025-04-07 09:21:52 -05:00
RUF101_0.py [`ruff`] Detect redirected-noqa in file-level comments (`RUF101`) (#14635) 2024-11-27 18:25:47 +01:00
RUF101_1.py [`ruff`] Detect redirected-noqa in file-level comments (`RUF101`) (#14635) 2024-11-27 18:25:47 +01:00
RUF102.py Implement `Invalid rule provided` as rule RUF102 with `--fix` (#17138) 2025-04-04 08:05:59 +00:00
confusables.py [`ruff`] Skip RUF001 diagnostics when visiting string type definitions (#16122) 2025-02-12 16:27:38 +00:00
flake8_noqa.py Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
noqa.py Make noqa parsing consistent and more robust (#16483) 2025-03-13 15:37:37 +01:00
redirects.py Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
ruff_noqa_all.py Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
ruff_noqa_codes.py Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
ruff_noqa_invalid.py Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
ruff_per_file_ignores.py Respect `per-file-ignores` for `RUF100` on blanket `# noqa` (#10908) 2024-04-12 13:45:29 +00:00