From 03018896deebfeb2cf96c28c897dd98a5e1c7699 Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Thu, 20 Jul 2023 23:55:01 -0400 Subject: [PATCH] Port over some fixes from #3747 (#5940) --- .../test/fixtures/{pygrep-hooks => pygrep_hooks}/PGH001_0.py | 0 .../test/fixtures/{pygrep-hooks => pygrep_hooks}/PGH001_1.py | 0 .../test/fixtures/{pygrep-hooks => pygrep_hooks}/PGH002_0.py | 0 .../test/fixtures/{pygrep-hooks => pygrep_hooks}/PGH002_1.py | 0 .../test/fixtures/{pygrep-hooks => pygrep_hooks}/PGH003_0.py | 0 .../test/fixtures/{pygrep-hooks => pygrep_hooks}/PGH003_1.py | 0 .../test/fixtures/{pygrep-hooks => pygrep_hooks}/PGH004_0.py | 0 .../test/fixtures/{pygrep-hooks => pygrep_hooks}/PGH005_0.py | 0 crates/ruff/src/rules/flake8_builtins/rules/rules.rs | 1 - crates/ruff/src/rules/pygrep_hooks/mod.rs | 2 +- scripts/add_plugin.py | 2 +- 11 files changed, 2 insertions(+), 3 deletions(-) rename crates/ruff/resources/test/fixtures/{pygrep-hooks => pygrep_hooks}/PGH001_0.py (100%) rename crates/ruff/resources/test/fixtures/{pygrep-hooks => pygrep_hooks}/PGH001_1.py (100%) rename crates/ruff/resources/test/fixtures/{pygrep-hooks => pygrep_hooks}/PGH002_0.py (100%) rename crates/ruff/resources/test/fixtures/{pygrep-hooks => pygrep_hooks}/PGH002_1.py (100%) rename crates/ruff/resources/test/fixtures/{pygrep-hooks => pygrep_hooks}/PGH003_0.py (100%) rename crates/ruff/resources/test/fixtures/{pygrep-hooks => pygrep_hooks}/PGH003_1.py (100%) rename crates/ruff/resources/test/fixtures/{pygrep-hooks => pygrep_hooks}/PGH004_0.py (100%) rename crates/ruff/resources/test/fixtures/{pygrep-hooks => pygrep_hooks}/PGH005_0.py (100%) delete mode 100644 crates/ruff/src/rules/flake8_builtins/rules/rules.rs diff --git a/crates/ruff/resources/test/fixtures/pygrep-hooks/PGH001_0.py b/crates/ruff/resources/test/fixtures/pygrep_hooks/PGH001_0.py similarity index 100% rename from crates/ruff/resources/test/fixtures/pygrep-hooks/PGH001_0.py rename to crates/ruff/resources/test/fixtures/pygrep_hooks/PGH001_0.py diff --git a/crates/ruff/resources/test/fixtures/pygrep-hooks/PGH001_1.py b/crates/ruff/resources/test/fixtures/pygrep_hooks/PGH001_1.py similarity index 100% rename from crates/ruff/resources/test/fixtures/pygrep-hooks/PGH001_1.py rename to crates/ruff/resources/test/fixtures/pygrep_hooks/PGH001_1.py diff --git a/crates/ruff/resources/test/fixtures/pygrep-hooks/PGH002_0.py b/crates/ruff/resources/test/fixtures/pygrep_hooks/PGH002_0.py similarity index 100% rename from crates/ruff/resources/test/fixtures/pygrep-hooks/PGH002_0.py rename to crates/ruff/resources/test/fixtures/pygrep_hooks/PGH002_0.py diff --git a/crates/ruff/resources/test/fixtures/pygrep-hooks/PGH002_1.py b/crates/ruff/resources/test/fixtures/pygrep_hooks/PGH002_1.py similarity index 100% rename from crates/ruff/resources/test/fixtures/pygrep-hooks/PGH002_1.py rename to crates/ruff/resources/test/fixtures/pygrep_hooks/PGH002_1.py diff --git a/crates/ruff/resources/test/fixtures/pygrep-hooks/PGH003_0.py b/crates/ruff/resources/test/fixtures/pygrep_hooks/PGH003_0.py similarity index 100% rename from crates/ruff/resources/test/fixtures/pygrep-hooks/PGH003_0.py rename to crates/ruff/resources/test/fixtures/pygrep_hooks/PGH003_0.py diff --git a/crates/ruff/resources/test/fixtures/pygrep-hooks/PGH003_1.py b/crates/ruff/resources/test/fixtures/pygrep_hooks/PGH003_1.py similarity index 100% rename from crates/ruff/resources/test/fixtures/pygrep-hooks/PGH003_1.py rename to crates/ruff/resources/test/fixtures/pygrep_hooks/PGH003_1.py diff --git a/crates/ruff/resources/test/fixtures/pygrep-hooks/PGH004_0.py b/crates/ruff/resources/test/fixtures/pygrep_hooks/PGH004_0.py similarity index 100% rename from crates/ruff/resources/test/fixtures/pygrep-hooks/PGH004_0.py rename to crates/ruff/resources/test/fixtures/pygrep_hooks/PGH004_0.py diff --git a/crates/ruff/resources/test/fixtures/pygrep-hooks/PGH005_0.py b/crates/ruff/resources/test/fixtures/pygrep_hooks/PGH005_0.py similarity index 100% rename from crates/ruff/resources/test/fixtures/pygrep-hooks/PGH005_0.py rename to crates/ruff/resources/test/fixtures/pygrep_hooks/PGH005_0.py diff --git a/crates/ruff/src/rules/flake8_builtins/rules/rules.rs b/crates/ruff/src/rules/flake8_builtins/rules/rules.rs deleted file mode 100644 index 8b13789179..0000000000 --- a/crates/ruff/src/rules/flake8_builtins/rules/rules.rs +++ /dev/null @@ -1 +0,0 @@ - diff --git a/crates/ruff/src/rules/pygrep_hooks/mod.rs b/crates/ruff/src/rules/pygrep_hooks/mod.rs index a19bfe9adb..c128517518 100644 --- a/crates/ruff/src/rules/pygrep_hooks/mod.rs +++ b/crates/ruff/src/rules/pygrep_hooks/mod.rs @@ -23,7 +23,7 @@ mod tests { fn rules(rule_code: Rule, path: &Path) -> Result<()> { let snapshot = format!("{}_{}", rule_code.noqa_code(), path.to_string_lossy()); let diagnostics = test_path( - Path::new("pygrep-hooks").join(path).as_path(), + Path::new("pygrep_hooks").join(path).as_path(), &settings::Settings::for_rule(rule_code), )?; assert_messages!(snapshot, diagnostics); diff --git a/scripts/add_plugin.py b/scripts/add_plugin.py index ce9e143a21..219cfa42ad 100755 --- a/scripts/add_plugin.py +++ b/scripts/add_plugin.py @@ -5,7 +5,7 @@ Example usage: python scripts/add_plugin.py \ flake8-pie \ - --url https://pypi.org/project/flake8-pie/ + --url https://pypi.org/project/flake8-pie/ \ --prefix PIE """ from __future__ import annotations