ruff/crates/ruff_linter/resources/test/fixtures
Ottavio Hartman 0d363ab239
fix(ERA001): detect commented out `case` statements, add more one-line support (#10055)
## Summary

Closes #10031 

- Detect commented out `case` statements. Playground repro:
https://play.ruff.rs/5a305aa9-6e5c-4fa4-999a-8fc427ab9a23
- Add more support for one-line commented out code.

## Test Plan

Unit tested and tested with
```sh
cargo run -p ruff -- check crates/ruff_linter/resources/test/fixtures/eradicate/ERA001.py --no-cache --preview --select ERA001
```

TODO:
- [x] `cargo insta test`
2024-02-19 22:56:42 -05:00
..
airflow Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
control-flow-graph Add erroneous for-loop test case for CFG (#8957) 2023-12-01 23:11:42 +00:00
eradicate fix(ERA001): detect commented out `case` statements, add more one-line support (#10055) 2024-02-19 22:56:42 -05:00
filesystem Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
flake8_2020 Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
flake8_annotations Handle raises with implicit alternate branches (#9377) 2024-01-02 22:59:12 -05:00
flake8_async [`flake8-async`] Take `pathlib.Path` into account when analyzing async functions (#9703) 2024-01-30 17:42:50 +00:00
flake8_bandit Detect `mark_safe` usages in decorators (#9887) 2024-02-07 23:10:46 -05:00
flake8_blind_except Add `Expr::Name` checks to rules which use `is_logger_candidate` (#7521) 2023-09-27 00:21:22 +00:00
flake8_boolean_trap Allow boolean positionals in `__post_init__` (#10027) 2024-02-18 15:03:17 +00:00
flake8_bugbear Recategorize `static-key-dict-comprehension` from `RUF011` to `B035` (#9428) 2024-02-01 13:35:02 -06:00
flake8_builtins Restrict `builtin-attribute-shadowing` to actual shadowed references (#9462) 2024-01-11 12:59:40 -05:00
flake8_commas Consider the new f-string tokens for `flake8-commas` (#8582) 2023-11-10 09:49:14 +05:30
flake8_comprehensions Remove CST-based fixer for `C408` (#9822) 2024-02-04 22:26:51 -05:00
flake8_datetimez Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
flake8_debugger Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
flake8_django Respect `__str__` definitions from super classes (#9338) 2023-12-31 22:25:08 +00:00
flake8_errmsg Allow `EM` fixes even if `msg` variable is defined (#9059) 2023-12-08 15:16:15 -06:00
flake8_executable Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
flake8_fixme Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
flake8_future_annotations Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
flake8_gettext Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
flake8_implicit_str_concat Add support for PEP 701 (#7376) 2023-09-29 02:55:39 +00:00
flake8_import_conventions Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
flake8_logging Add `Expr::Name` checks to rules which use `is_logger_candidate` (#7521) 2023-09-27 00:21:22 +00:00
flake8_logging_format Add `Expr::Name` checks to rules which use `is_logger_candidate` (#7521) 2023-09-27 00:21:22 +00:00
flake8_no_pep420 Avoid missing namespace violations in scripts with shebangs (#8710) 2023-11-16 17:21:33 -05:00
flake8_pie Respect generic `Protocol` in ellipsis removal (#9841) 2024-02-05 19:36:16 +00:00
flake8_print Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
flake8_pyi [`flake8-pyi`] Ignore 'unused' private type dicts in class scopes (#9952) 2024-02-12 17:06:20 +00:00
flake8_pytest_style Rename `Autofix` to `Fix` (#7657) 2023-09-28 10:53:05 +00:00
flake8_quotes Add new rule to check for useless quote escapes (#8630) 2023-11-13 21:59:37 +00:00
flake8_raise Avoid removing parentheses on ctypes.WinError (#9027) 2023-12-06 17:05:34 +00:00
flake8_return Skip empty lines when determining base indentation (#9795) 2024-02-02 19:42:47 +00:00
flake8_self Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
flake8_simplify Fix SIM113 false positive with async for loops (#9996) 2024-02-15 22:40:01 -05:00
flake8_slots Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
flake8_tidy_imports Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
flake8_todos Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
flake8_trio Respect `async with` in `timeout-without-await` (#9859) 2024-02-06 12:04:24 -05:00
flake8_type_checking Recategorize `runtime-string-union` to `TCH010` (#9721) 2024-02-01 13:35:02 -06:00
flake8_unused_arguments Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
flake8_use_pathlib Show custom message for `Path.joinpath` with starred arguments (#7852) 2023-10-09 12:04:35 +00:00
flynt Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
isort Avoid invalid combination of `force-sort-within-types` and `lines-between-types` (#9041) 2023-12-06 23:56:14 -05:00
mccabe Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
numpy Add more NPY002 violations (#9862) 2024-02-07 09:54:11 -05:00
pandas_vet Limit inplace diagnostics to methods that accept inplace (#9495) 2024-01-12 14:12:54 -05:00
pep8_naming Allow class names when `apps.get_model` is a non-string (#9065) 2023-12-08 22:59:05 -05:00
perflint [`perflint`] Catch a wider range of mutations in `PERF101` (#9955) 2024-02-12 12:17:55 -05:00
pycodestyle Do multiline string test for W293 too (#10049) 2024-02-19 11:58:56 +00:00
pydocstyle [`pydocstyle-D405`] Allow using `parameters` as a sub-section header (#9894) 2024-02-08 21:54:32 -05:00
pyflakes Recursively visit deferred AST nodes (#9541) 2024-01-15 20:34:38 -05:00
pygrep_hooks Redirect `PHG001` to `S307` and `PGH002` to `G010` (#9756) 2024-02-01 13:35:02 -06:00
pylint [`pylint`] Add PLE1141 `DictIterMissingItems` (#9845) 2024-02-19 19:56:55 +05:30
pyupgrade Respect duplicates when rewriting type aliases (#9905) 2024-02-09 14:02:41 +00:00
refurb Respect tuple assignments in typing analyzer (#9969) 2024-02-13 05:02:52 +00:00
ruff Fix panic on RUF027 (#9990) 2024-02-16 20:04:39 +00:00
tryceratops Redirect `TRY200` to `B904` (#9755) 2024-02-01 13:35:02 -06:00
__init__.py [`pylint`] (Re-)Implement `import-private-name` (`C2701`) (#9553) 2024-01-16 14:03:11 -05:00