Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate PGH001 in favor of S307 #7506

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions crates/ruff/resources/test/fixtures/pygrep_hooks/PGH001_0.py

This file was deleted.

11 changes: 0 additions & 11 deletions crates/ruff/resources/test/fixtures/pygrep_hooks/PGH001_1.py

This file was deleted.

3 changes: 0 additions & 3 deletions crates/ruff/src/checkers/ast/analyze/expression.rs
Original file line number Diff line number Diff line change
Expand Up @@ -736,9 +736,6 @@ pub(crate) fn expression(expr: &Expr, checker: &mut Checker) {
if checker.enabled(Rule::CallDateFromtimestamp) {
flake8_datetimez::rules::call_date_fromtimestamp(checker, func, expr.range());
}
if checker.enabled(Rule::Eval) {
pygrep_hooks::rules::no_eval(checker, func);
}
if checker.enabled(Rule::DeprecatedLogWarn) {
pygrep_hooks::rules::deprecated_log_warn(checker, func);
}
Expand Down
1 change: 0 additions & 1 deletion crates/ruff/src/codes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,6 @@ pub fn code_to_rule(linter: Linter, code: &str) -> Option<(RuleGroup, Rule)> {
(Flake8Datetimez, "012") => (RuleGroup::Unspecified, rules::flake8_datetimez::rules::CallDateFromtimestamp),

// pygrep-hooks
(PygrepHooks, "001") => (RuleGroup::Unspecified, rules::pygrep_hooks::rules::Eval),
(PygrepHooks, "002") => (RuleGroup::Unspecified, rules::pygrep_hooks::rules::DeprecatedLogWarn),
(PygrepHooks, "003") => (RuleGroup::Unspecified, rules::pygrep_hooks::rules::BlanketTypeIgnore),
(PygrepHooks, "004") => (RuleGroup::Unspecified, rules::pygrep_hooks::rules::BlanketNOQA),
Expand Down
1 change: 1 addition & 0 deletions crates/ruff/src/rule_redirects.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,5 +98,6 @@ static REDIRECTS: Lazy<HashMap<&'static str, &'static str>> = Lazy::new(|| {
("T002", "FIX002"),
("T003", "FIX003"),
("T004", "FIX004"),
("PGH001", "S307"),
])
});
2 changes: 0 additions & 2 deletions crates/ruff/src/rules/pygrep_hooks/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ mod tests {
use crate::test::test_path;
use crate::{assert_messages, settings};

#[test_case(Rule::Eval, Path::new("PGH001_0.py"))]
#[test_case(Rule::Eval, Path::new("PGH001_1.py"))]
#[test_case(Rule::DeprecatedLogWarn, Path::new("PGH002_0.py"))]
#[test_case(Rule::DeprecatedLogWarn, Path::new("PGH002_1.py"))]
#[test_case(Rule::BlanketTypeIgnore, Path::new("PGH003_0.py"))]
Expand Down
2 changes: 0 additions & 2 deletions crates/ruff/src/rules/pygrep_hooks/rules/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@ pub(crate) use blanket_noqa::*;
pub(crate) use blanket_type_ignore::*;
pub(crate) use deprecated_log_warn::*;
pub(crate) use invalid_mock_access::*;
pub(crate) use no_eval::*;

mod blanket_noqa;
mod blanket_type_ignore;
mod deprecated_log_warn;
mod invalid_mock_access;
mod no_eval;
56 changes: 0 additions & 56 deletions crates/ruff/src/rules/pygrep_hooks/rules/no_eval.rs

This file was deleted.

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion ruff.schema.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading