Skip to content
Merged
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
8 changes: 1 addition & 7 deletions crates/ruff/tests/cli/lint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5084,16 +5084,9 @@ fn default_rules() -> Result<()> {
unnecessary-map (C417),
unnecessary-literal-within-dict-call (C418),
unnecessary-comprehension-in-call (C419),
call-datetime-without-tzinfo (DTZ001),
call-datetime-today (DTZ002),
call-datetime-utcnow (DTZ003),
call-datetime-utcfromtimestamp (DTZ004),
call-datetime-now-without-tzinfo (DTZ005),
call-datetime-fromtimestamp (DTZ006),
call-datetime-strptime-without-zone (DTZ007),
call-date-today (DTZ011),
call-date-fromtimestamp (DTZ012),
datetime-min-max (DTZ901),
debugger (T100),
shebang-not-executable (EXE001),
shebang-missing-executable-file (EXE002),
Expand Down Expand Up @@ -5216,6 +5209,7 @@ fn default_rules() -> Result<()> {
unused-import (F401),
import-shadowed-by-loop-var (F402),
late-future-import (F404),
undefined-local-with-nested-import-star-usage (F406),
future-feature-not-defined (F407),
percent-format-invalid-format (F501),
percent-format-expected-mapping (F502),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,16 +139,9 @@ linter.rules.enabled = [
unnecessary-map (C417),
unnecessary-literal-within-dict-call (C418),
unnecessary-comprehension-in-call (C419),
call-datetime-without-tzinfo (DTZ001),
call-datetime-today (DTZ002),
call-datetime-utcnow (DTZ003),
call-datetime-utcfromtimestamp (DTZ004),
call-datetime-now-without-tzinfo (DTZ005),
call-datetime-fromtimestamp (DTZ006),
call-datetime-strptime-without-zone (DTZ007),
call-date-today (DTZ011),
call-date-fromtimestamp (DTZ012),
datetime-min-max (DTZ901),
debugger (T100),
shebang-not-executable (EXE001),
shebang-missing-executable-file (EXE002),
Expand Down Expand Up @@ -271,6 +264,7 @@ linter.rules.enabled = [
unused-import (F401),
import-shadowed-by-loop-var (F402),
late-future-import (F404),
undefined-local-with-nested-import-star-usage (F406),
future-feature-not-defined (F407),
percent-format-invalid-format (F501),
percent-format-expected-mapping (F502),
Expand Down Expand Up @@ -554,16 +548,9 @@ linter.rules.should_fix = [
unnecessary-map (C417),
unnecessary-literal-within-dict-call (C418),
unnecessary-comprehension-in-call (C419),
call-datetime-without-tzinfo (DTZ001),
call-datetime-today (DTZ002),
call-datetime-utcnow (DTZ003),
call-datetime-utcfromtimestamp (DTZ004),
call-datetime-now-without-tzinfo (DTZ005),
call-datetime-fromtimestamp (DTZ006),
call-datetime-strptime-without-zone (DTZ007),
call-date-today (DTZ011),
call-date-fromtimestamp (DTZ012),
datetime-min-max (DTZ901),
debugger (T100),
shebang-not-executable (EXE001),
shebang-missing-executable-file (EXE002),
Expand Down Expand Up @@ -686,6 +673,7 @@ linter.rules.should_fix = [
unused-import (F401),
import-shadowed-by-loop-var (F402),
late-future-import (F404),
undefined-local-with-nested-import-star-usage (F406),
future-feature-not-defined (F407),
percent-format-invalid-format (F501),
percent-format-expected-mapping (F502),
Expand Down
16 changes: 1 addition & 15 deletions crates/ruff_linter/src/settings/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -413,16 +413,9 @@ pub const DEFAULT_SELECTORS: &[RuleSelector] = &[
RuleSelector::rule(Rule::UnnecessaryLiteralWithinDictCall), // C418
RuleSelector::rule(Rule::UnnecessaryComprehensionInCall), // C419
RuleSelector::rule(Rule::EmptyDocstring), // D419
RuleSelector::rule(Rule::CallDatetimeWithoutTzinfo), // DTZ001
RuleSelector::rule(Rule::CallDatetimeToday), // DTZ002
RuleSelector::rule(Rule::CallDatetimeUtcnow), // DTZ003
RuleSelector::rule(Rule::CallDatetimeUtcfromtimestamp), // DTZ004
RuleSelector::rule(Rule::CallDatetimeNowWithoutTzinfo), // DTZ005
RuleSelector::rule(Rule::CallDatetimeFromtimestamp), // DTZ006
RuleSelector::rule(Rule::CallDatetimeStrptimeWithoutZone), // DTZ007
RuleSelector::rule(Rule::CallDateToday), // DTZ011
RuleSelector::rule(Rule::CallDateFromtimestamp), // DTZ012
RuleSelector::rule(Rule::DatetimeMinMax), // DTZ901
RuleSelector::rule(Rule::BareExcept), // E722
RuleSelector::rule(Rule::IOError), // E902
RuleSelector::rule(Rule::ShebangNotExecutable), // EXE001
Expand All @@ -432,6 +425,7 @@ pub const DEFAULT_SELECTORS: &[RuleSelector] = &[
RuleSelector::rule(Rule::UnusedImport), // F401
RuleSelector::rule(Rule::ImportShadowedByLoopVar), // F402
RuleSelector::rule(Rule::LateFutureImport), // F404
RuleSelector::rule(Rule::UndefinedLocalWithNestedImportStarUsage), // F406
RuleSelector::rule(Rule::FutureFeatureNotDefined), // F407
RuleSelector::rule(Rule::PercentFormatInvalidFormat), // F501
RuleSelector::rule(Rule::PercentFormatExpectedMapping), // F502
Expand Down Expand Up @@ -1013,7 +1007,6 @@ mod tests {
pandas-use-of-dot-read-table (PD012),
pandas-use-of-pd-merge (PD015),
escape-sequence-in-docstring (D301),
undefined-local-with-nested-import-star-usage (F406),
missing-maxsplit-arg (PLC0207),
unnecessary-dunder-call (PLC2801),
duplicate-bases (PLE0241),
Expand Down Expand Up @@ -1070,13 +1063,6 @@ mod tests {
Removed in preview:
[
exec-builtin (S102),
call-datetime-without-tzinfo (DTZ001),
call-datetime-now-without-tzinfo (DTZ005),
call-datetime-fromtimestamp (DTZ006),
call-datetime-strptime-without-zone (DTZ007),
call-date-today (DTZ011),
call-date-fromtimestamp (DTZ012),
datetime-min-max (DTZ901),
]
");
}
Expand Down
Loading