diff --git a/crates/ruff_linter/src/checkers/ast/analyze/expression.rs b/crates/ruff_linter/src/checkers/ast/analyze/expression.rs index 46da644efa3b59..cb489aeeaaa497 100644 --- a/crates/ruff_linter/src/checkers/ast/analyze/expression.rs +++ b/crates/ruff_linter/src/checkers/ast/analyze/expression.rs @@ -340,7 +340,7 @@ pub(crate) fn expression(expr: &Expr, checker: &mut Checker) { flake8_2020::rules::name_or_attribute(checker, expr); } if checker.enabled(Rule::UseDatetimeMaxMin) { - flake8_datetimez::rules::use_datetime_max_min(checker, expr); + flake8_datetimez::rules::datetime_max_min(checker, expr); } if checker.enabled(Rule::BannedApi) { flake8_tidy_imports::rules::banned_attribute_access(checker, expr); diff --git a/crates/ruff_linter/src/rules/flake8_datetimez/rules/use_datetime_max_min.rs b/crates/ruff_linter/src/rules/flake8_datetimez/rules/datetime_max_min.rs similarity index 97% rename from crates/ruff_linter/src/rules/flake8_datetimez/rules/use_datetime_max_min.rs rename to crates/ruff_linter/src/rules/flake8_datetimez/rules/datetime_max_min.rs index 1e4e0090fd0434..a9b5f06cefa9c1 100644 --- a/crates/ruff_linter/src/rules/flake8_datetimez/rules/use_datetime_max_min.rs +++ b/crates/ruff_linter/src/rules/flake8_datetimez/rules/datetime_max_min.rs @@ -68,7 +68,7 @@ impl Violation for UseDatetimeMaxMin { } /// DTZ901 -pub(crate) fn use_datetime_max_min(checker: &mut Checker, expr: &Expr) { +pub(crate) fn datetime_max_min(checker: &mut Checker, expr: &Expr) { let semantic = checker.semantic(); if !semantic.seen_module(Modules::DATETIME) { diff --git a/crates/ruff_linter/src/rules/flake8_datetimez/rules/mod.rs b/crates/ruff_linter/src/rules/flake8_datetimez/rules/mod.rs index f5f26e0cd803bb..0c8aacee85304d 100644 --- a/crates/ruff_linter/src/rules/flake8_datetimez/rules/mod.rs +++ b/crates/ruff_linter/src/rules/flake8_datetimez/rules/mod.rs @@ -7,7 +7,7 @@ pub(crate) use call_datetime_today::*; pub(crate) use call_datetime_utcfromtimestamp::*; pub(crate) use call_datetime_utcnow::*; pub(crate) use call_datetime_without_tzinfo::*; -pub(crate) use use_datetime_max_min::*; +pub(crate) use datetime_max_min::*; mod call_date_fromtimestamp; mod call_date_today; @@ -19,4 +19,4 @@ mod call_datetime_utcfromtimestamp; mod call_datetime_utcnow; mod call_datetime_without_tzinfo; mod helpers; -mod use_datetime_max_min; +mod datetime_max_min;