ruff/crates/ruff_linter/src
Alex Waygood d8debb7a36
Simplify logic for RUF027 (#12907)
## Summary

This PR is a pure refactor to simplify some of the logic for `RUF027`.
This will make it easier to file some followup PRs to help reduce the
false positives from this rule. I'm separating the refactor out into a
separate PR so it's easier to review, and so I can double-check from the
ecosystem report that this doesn't have any user-facing impact.

## Test Plan

`cargo test -p ruff_linter --lib`
2024-08-16 08:05:15 +01:00
..
checkers [fastapi] Implement fast-api-unused-path-parameter (FAST003) (#12638) 2024-08-16 01:46:35 +00:00
comments Rename ruff crate to ruff_linter (#7529) 2023-09-20 08:38:27 +02:00
cst Wrap expressions in parentheses when negating (#10346) 2024-03-11 18:20:55 -04:00
docstrings [pydoclint] Implement docstring-missing-exception and docstring-extraneous-exception (DOC501, DOC502) (#11471) 2024-07-20 19:41:51 +00:00
fix [fastapi] Implement fast-api-unused-path-parameter (FAST003) (#12638) 2024-08-16 01:46:35 +00:00
importer Move required import parsing out of lint rule (#12536) 2024-07-26 13:35:45 -04:00
message Upgrade to Rust 1.80 (#12586) 2024-07-30 19:18:08 +00:00
registry Upgrade to Rust 1.79 (#11875) 2024-06-17 07:15:10 +01:00
rules Simplify logic for RUF027 (#12907) 2024-08-16 08:05:15 +01:00
settings Detect imports in src layouts by default (#12848) 2024-08-14 18:15:45 +02:00
snapshots Consider VS Code cell metadata to determine valid code cells (#12864) 2024-08-13 22:09:56 +05:30
codes.rs [fastapi] Implement fast-api-unused-path-parameter (FAST003) (#12638) 2024-08-16 01:46:35 +00:00
directives.rs Enable token-based rules on source with syntax errors (#11950) 2024-07-02 08:57:46 +00:00
doc_lines.rs Enable token-based rules on source with syntax errors (#11950) 2024-07-02 08:57:46 +00:00
fs.rs Struct not tuple for compiled per-file ignores (#10864) 2024-04-11 13:47:57 -06:00
lib.rs Remove E999 as a rule, disallow any disablement methods for syntax error (#11901) 2024-06-27 13:44:11 +02:00
line_width.rs Upgrade to Rust 1.78 (#11260) 2024-05-03 12:46:21 +00:00
linter.rs Consider VS Code cell metadata to determine valid code cells (#12864) 2024-08-13 22:09:56 +05:30
logging.rs Replace LALRPOP parser with hand-written parser (#10036) 2024-04-18 17:57:39 +05:30
noqa.rs Remove E999 as a rule, disallow any disablement methods for syntax error (#11901) 2024-06-27 13:44:11 +02:00
packaging.rs Nested namespace packages support (#10541) 2024-03-24 22:53:32 -04:00
pyproject_toml.rs Update pyproject-toml to 0.8 (#8351) 2023-10-30 10:05:37 +00:00
registry.rs [flake8-builtins] Implement import, lambda, and module shadowing (#12546) 2024-07-29 01:42:42 +00:00
renamer.rs Remove BindingKind::ComprehensionVar (#12347) 2024-07-16 11:18:04 -04:00
rule_redirects.rs Re-code unnecessary-dict-comprehension-for-iterable (RUF025) as C420 (#12533) 2024-08-14 18:15:45 +02:00
rule_selector.rs Added ignoring deprecated rules for --select=ALL (#10497) 2024-06-27 13:44:11 +02:00
source_kind.rs Handle non-printable characters in diff view (#11687) 2024-06-08 06:22:03 +00:00
test.rs Disable auto-fix when source has syntax errors (#12134) 2024-07-02 14:22:51 +05:30
text_helpers.rs Handle non-printable characters in diff view (#11687) 2024-06-08 06:22:03 +00:00
upstream_categories.rs Fix pylint upstream categories not showing in docs (#10441) 2024-03-18 01:27:39 +00:00