Skip to content

Commit

Permalink
Rename rule
Browse files Browse the repository at this point in the history
  • Loading branch information
InSyncWithFoo committed Nov 12, 2024
1 parent d4f86d7 commit 763fe87
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion crates/ruff_linter/src/checkers/ast/analyze/expression.rs
Original file line number Diff line number Diff line change
@@ -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);
Original file line number Diff line number Diff line change
@@ -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) {
4 changes: 2 additions & 2 deletions crates/ruff_linter/src/rules/flake8_datetimez/rules/mod.rs
Original file line number Diff line number Diff line change
@@ -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;

0 comments on commit 763fe87

Please sign in to comment.