Default Rules
Ruff enables the following rules by default:
Default select configuration
[tool.ruff.lint]
select = [
"YTT101",
"YTT102",
"YTT103",
"YTT201",
"YTT202",
"YTT203",
"YTT204",
"YTT301",
"YTT302",
"YTT303",
"ASYNC100",
"ASYNC105",
"ASYNC115",
"ASYNC116",
"ASYNC210",
"ASYNC220",
"ASYNC221",
"ASYNC222",
"ASYNC230",
"ASYNC251",
"S102",
"S110",
"S112",
"BLE001",
"B002",
"B003",
"B004",
"B005",
"B006",
"B008",
"B009",
"B010",
"B012",
"B013",
"B014",
"B015",
"B016",
"B017",
"B018",
"B019",
"B020",
"B021",
"B022",
"B023",
"B025",
"B026",
"B029",
"B030",
"B031",
"B032",
"B033",
"B035",
"B039",
"C400",
"C401",
"C402",
"C403",
"C404",
"C405",
"C406",
"C408",
"C409",
"C410",
"C411",
"C413",
"C414",
"C415",
"C417",
"C418",
"C419",
"DTZ001",
"DTZ002",
"DTZ003",
"DTZ004",
"DTZ005",
"DTZ006",
"DTZ007",
"DTZ011",
"DTZ012",
"DTZ901",
"T100",
"EXE001",
"EXE002",
"EXE004",
"EXE005",
"FA100",
"FA102",
"INT001",
"INT002",
"INT003",
"ISC004",
"LOG001",
"LOG002",
"LOG009",
"LOG014",
"LOG015",
"G010",
"G101",
"G201",
"G202",
"PIE790",
"PIE794",
"PIE796",
"PIE800",
"PIE804",
"PIE807",
"PIE808",
"PIE810",
"PYI001",
"PYI002",
"PYI003",
"PYI004",
"PYI005",
"PYI006",
"PYI007",
"PYI008",
"PYI009",
"PYI010",
"PYI012",
"PYI013",
"PYI015",
"PYI016",
"PYI017",
"PYI018",
"PYI019",
"PYI020",
"PYI025",
"PYI026",
"PYI029",
"PYI030",
"PYI032",
"PYI033",
"PYI034",
"PYI035",
"PYI036",
"PYI041",
"PYI042",
"PYI043",
"PYI044",
"PYI045",
"PYI046",
"PYI047",
"PYI048",
"PYI049",
"PYI050",
"PYI052",
"PYI055",
"PYI057",
"PYI058",
"PYI059",
"PYI061",
"PYI062",
"PYI063",
"PYI064",
"PYI066",
"PT010",
"PT014",
"PT020",
"PT025",
"PT026",
"PT031",
"RET501",
"SIM101",
"SIM102",
"SIM103",
"SIM107",
"SIM113",
"SIM114",
"SIM115",
"SIM117",
"SIM118",
"SIM201",
"SIM202",
"SIM208",
"SIM210",
"SIM211",
"SIM220",
"SIM221",
"SIM222",
"SIM223",
"SIM401",
"SIM905",
"SIM911",
"TC004",
"TC005",
"TC007",
"TC010",
"PTH124",
"PTH210",
"FLY002",
"I001",
"N999",
"PERF101",
"PERF102",
"PERF402",
"E722",
"E902",
"W605",
"D419",
"F401",
"F402",
"F404",
"F407",
"F501",
"F502",
"F503",
"F504",
"F505",
"F506",
"F507",
"F508",
"F509",
"F521",
"F522",
"F523",
"F524",
"F525",
"F541",
"F601",
"F602",
"F621",
"F622",
"F631",
"F632",
"F633",
"F634",
"F701",
"F702",
"F704",
"F706",
"F707",
"F811",
"F821",
"F822",
"F823",
"F841",
"F842",
"F901",
"PGH005",
"PLC0105",
"PLC0131",
"PLC0132",
"PLC0205",
"PLC0206",
"PLC0208",
"PLC0414",
"PLC3002",
"PLE0100",
"PLE0101",
"PLE0115",
"PLE0116",
"PLE0117",
"PLE0118",
"PLE0303",
"PLE0304",
"PLE0305",
"PLE0307",
"PLE0308",
"PLE0309",
"PLE0604",
"PLE0605",
"PLE0643",
"PLE0704",
"PLE1132",
"PLE1142",
"PLE1205",
"PLE1206",
"PLE1300",
"PLE1307",
"PLE1310",
"PLE1507",
"PLE1519",
"PLE1520",
"PLE1700",
"PLE2502",
"PLE2510",
"PLE2512",
"PLE2513",
"PLE2514",
"PLE2515",
"PLR0124",
"PLR0133",
"PLR0206",
"PLR0402",
"PLR1704",
"PLR1708",
"PLR1711",
"PLR1716",
"PLR1722",
"PLR1730",
"PLR1733",
"PLR1736",
"PLR2044",
"PLW0120",
"PLW0127",
"PLW0128",
"PLW0129",
"PLW0131",
"PLW0133",
"PLW0177",
"PLW0211",
"PLW0245",
"PLW0406",
"PLW0602",
"PLW0604",
"PLW0642",
"PLW0711",
"PLW1501",
"PLW1507",
"PLW1508",
"PLW1509",
"PLW1510",
"PLW2101",
"UP001",
"UP003",
"UP004",
"UP005",
"UP006",
"UP007",
"UP008",
"UP009",
"UP010",
"UP011",
"UP012",
"UP014",
"UP017",
"UP018",
"UP019",
"UP020",
"UP021",
"UP022",
"UP023",
"UP024",
"UP025",
"UP026",
"UP028",
"UP029",
"UP030",
"UP031",
"UP032",
"UP033",
"UP034",
"UP035",
"UP036",
"UP037",
"UP039",
"UP040",
"UP041",
"UP043",
"UP044",
"UP045",
"UP046",
"UP047",
"UP049",
"UP050",
"FURB105",
"FURB122",
"FURB129",
"FURB132",
"FURB136",
"FURB157",
"FURB161",
"FURB162",
"FURB163",
"FURB166",
"FURB167",
"FURB168",
"FURB169",
"FURB177",
"FURB181",
"FURB188",
"FURB192",
"RUF007",
"RUF008",
"RUF009",
"RUF010",
"RUF012",
"RUF013",
"RUF015",
"RUF016",
"RUF017",
"RUF018",
"RUF019",
"RUF020",
"RUF022",
"RUF023",
"RUF024",
"RUF026",
"RUF028",
"RUF030",
"RUF032",
"RUF033",
"RUF034",
"RUF040",
"RUF041",
"RUF046",
"RUF048",
"RUF049",
"RUF051",
"RUF053",
"RUF057",
"RUF058",
"RUF059",
"RUF063",
"RUF068",
"RUF100",
"RUF101",
"RUF200",
"TRY002",
"TRY004",
"TRY201",
"TRY203",
"TRY401",
]
[lint]
select = [
"YTT101",
"YTT102",
"YTT103",
"YTT201",
"YTT202",
"YTT203",
"YTT204",
"YTT301",
"YTT302",
"YTT303",
"ASYNC100",
"ASYNC105",
"ASYNC115",
"ASYNC116",
"ASYNC210",
"ASYNC220",
"ASYNC221",
"ASYNC222",
"ASYNC230",
"ASYNC251",
"S102",
"S110",
"S112",
"BLE001",
"B002",
"B003",
"B004",
"B005",
"B006",
"B008",
"B009",
"B010",
"B012",
"B013",
"B014",
"B015",
"B016",
"B017",
"B018",
"B019",
"B020",
"B021",
"B022",
"B023",
"B025",
"B026",
"B029",
"B030",
"B031",
"B032",
"B033",
"B035",
"B039",
"C400",
"C401",
"C402",
"C403",
"C404",
"C405",
"C406",
"C408",
"C409",
"C410",
"C411",
"C413",
"C414",
"C415",
"C417",
"C418",
"C419",
"DTZ001",
"DTZ002",
"DTZ003",
"DTZ004",
"DTZ005",
"DTZ006",
"DTZ007",
"DTZ011",
"DTZ012",
"DTZ901",
"T100",
"EXE001",
"EXE002",
"EXE004",
"EXE005",
"FA100",
"FA102",
"INT001",
"INT002",
"INT003",
"ISC004",
"LOG001",
"LOG002",
"LOG009",
"LOG014",
"LOG015",
"G010",
"G101",
"G201",
"G202",
"PIE790",
"PIE794",
"PIE796",
"PIE800",
"PIE804",
"PIE807",
"PIE808",
"PIE810",
"PYI001",
"PYI002",
"PYI003",
"PYI004",
"PYI005",
"PYI006",
"PYI007",
"PYI008",
"PYI009",
"PYI010",
"PYI012",
"PYI013",
"PYI015",
"PYI016",
"PYI017",
"PYI018",
"PYI019",
"PYI020",
"PYI025",
"PYI026",
"PYI029",
"PYI030",
"PYI032",
"PYI033",
"PYI034",
"PYI035",
"PYI036",
"PYI041",
"PYI042",
"PYI043",
"PYI044",
"PYI045",
"PYI046",
"PYI047",
"PYI048",
"PYI049",
"PYI050",
"PYI052",
"PYI055",
"PYI057",
"PYI058",
"PYI059",
"PYI061",
"PYI062",
"PYI063",
"PYI064",
"PYI066",
"PT010",
"PT014",
"PT020",
"PT025",
"PT026",
"PT031",
"RET501",
"SIM101",
"SIM102",
"SIM103",
"SIM107",
"SIM113",
"SIM114",
"SIM115",
"SIM117",
"SIM118",
"SIM201",
"SIM202",
"SIM208",
"SIM210",
"SIM211",
"SIM220",
"SIM221",
"SIM222",
"SIM223",
"SIM401",
"SIM905",
"SIM911",
"TC004",
"TC005",
"TC007",
"TC010",
"PTH124",
"PTH210",
"FLY002",
"I001",
"N999",
"PERF101",
"PERF102",
"PERF402",
"E722",
"E902",
"W605",
"D419",
"F401",
"F402",
"F404",
"F407",
"F501",
"F502",
"F503",
"F504",
"F505",
"F506",
"F507",
"F508",
"F509",
"F521",
"F522",
"F523",
"F524",
"F525",
"F541",
"F601",
"F602",
"F621",
"F622",
"F631",
"F632",
"F633",
"F634",
"F701",
"F702",
"F704",
"F706",
"F707",
"F811",
"F821",
"F822",
"F823",
"F841",
"F842",
"F901",
"PGH005",
"PLC0105",
"PLC0131",
"PLC0132",
"PLC0205",
"PLC0206",
"PLC0208",
"PLC0414",
"PLC3002",
"PLE0100",
"PLE0101",
"PLE0115",
"PLE0116",
"PLE0117",
"PLE0118",
"PLE0303",
"PLE0304",
"PLE0305",
"PLE0307",
"PLE0308",
"PLE0309",
"PLE0604",
"PLE0605",
"PLE0643",
"PLE0704",
"PLE1132",
"PLE1142",
"PLE1205",
"PLE1206",
"PLE1300",
"PLE1307",
"PLE1310",
"PLE1507",
"PLE1519",
"PLE1520",
"PLE1700",
"PLE2502",
"PLE2510",
"PLE2512",
"PLE2513",
"PLE2514",
"PLE2515",
"PLR0124",
"PLR0133",
"PLR0206",
"PLR0402",
"PLR1704",
"PLR1708",
"PLR1711",
"PLR1716",
"PLR1722",
"PLR1730",
"PLR1733",
"PLR1736",
"PLR2044",
"PLW0120",
"PLW0127",
"PLW0128",
"PLW0129",
"PLW0131",
"PLW0133",
"PLW0177",
"PLW0211",
"PLW0245",
"PLW0406",
"PLW0602",
"PLW0604",
"PLW0642",
"PLW0711",
"PLW1501",
"PLW1507",
"PLW1508",
"PLW1509",
"PLW1510",
"PLW2101",
"UP001",
"UP003",
"UP004",
"UP005",
"UP006",
"UP007",
"UP008",
"UP009",
"UP010",
"UP011",
"UP012",
"UP014",
"UP017",
"UP018",
"UP019",
"UP020",
"UP021",
"UP022",
"UP023",
"UP024",
"UP025",
"UP026",
"UP028",
"UP029",
"UP030",
"UP031",
"UP032",
"UP033",
"UP034",
"UP035",
"UP036",
"UP037",
"UP039",
"UP040",
"UP041",
"UP043",
"UP044",
"UP045",
"UP046",
"UP047",
"UP049",
"UP050",
"FURB105",
"FURB122",
"FURB129",
"FURB132",
"FURB136",
"FURB157",
"FURB161",
"FURB162",
"FURB163",
"FURB166",
"FURB167",
"FURB168",
"FURB169",
"FURB177",
"FURB181",
"FURB188",
"FURB192",
"RUF007",
"RUF008",
"RUF009",
"RUF010",
"RUF012",
"RUF013",
"RUF015",
"RUF016",
"RUF017",
"RUF018",
"RUF019",
"RUF020",
"RUF022",
"RUF023",
"RUF024",
"RUF026",
"RUF028",
"RUF030",
"RUF032",
"RUF033",
"RUF034",
"RUF040",
"RUF041",
"RUF046",
"RUF048",
"RUF049",
"RUF051",
"RUF053",
"RUF057",
"RUF058",
"RUF059",
"RUF063",
"RUF068",
"RUF100",
"RUF101",
"RUF200",
"TRY002",
"TRY004",
"TRY201",
"TRY203",
"TRY401",
]
flake8-2020 (YTT)
sys-version-slice3(YTT101)sys-version2(YTT102)sys-version-cmp-str3(YTT103)sys-version-info0-eq3(YTT201)six-py3(YTT202)sys-version-info1-cmp-int(YTT203)sys-version-info-minor-cmp-int(YTT204)sys-version0(YTT301)sys-version-cmp-str10(YTT302)sys-version-slice1(YTT303)
flake8-async (ASYNC)
cancel-scope-no-checkpoint(ASYNC100)trio-sync-call(ASYNC105)async-zero-sleep(ASYNC115)long-sleep-not-forever(ASYNC116)blocking-http-call-in-async-function(ASYNC210)create-subprocess-in-async-function(ASYNC220)run-process-in-async-function(ASYNC221)wait-for-process-in-async-function(ASYNC222)blocking-open-call-in-async-function(ASYNC230)blocking-sleep-in-async-function(ASYNC251)
flake8-bandit (S)
exec-builtin(S102)try-except-pass(S110)try-except-continue(S112)
flake8-blind-except (BLE)
blind-except(BLE001)
flake8-bugbear (B)
unary-prefix-increment-decrement(B002)assignment-to-os-environ(B003)unreliable-callable-check(B004)strip-with-multi-characters(B005)mutable-argument-default(B006)function-call-in-default-argument(B008)get-attr-with-constant(B009)set-attr-with-constant(B010)jump-statement-in-finally(B012)redundant-tuple-in-exception-handler(B013)duplicate-handler-exception(B014)useless-comparison(B015)raise-literal(B016)assert-raises-exception(B017)useless-expression(B018)cached-instance-method(B019)loop-variable-overrides-iterator(B020)f-string-docstring(B021)useless-contextlib-suppress(B022)function-uses-loop-variable(B023)duplicate-try-block-exception(B025)star-arg-unpacking-after-keyword-arg(B026)except-with-empty-tuple(B029)except-with-non-exception-classes(B030)reuse-of-groupby-generator(B031)unintentional-type-annotation(B032)duplicate-value(B033)static-key-dict-comprehension(B035)mutable-contextvar-default(B039)
flake8-comprehensions (C4)
unnecessary-generator-list(C400)unnecessary-generator-set(C401)unnecessary-generator-dict(C402)unnecessary-list-comprehension-set(C403)unnecessary-list-comprehension-dict(C404)unnecessary-literal-set(C405)unnecessary-literal-dict(C406)unnecessary-collection-call(C408)unnecessary-literal-within-tuple-call(C409)unnecessary-literal-within-list-call(C410)unnecessary-list-call(C411)unnecessary-call-around-sorted(C413)unnecessary-double-cast-or-process(C414)unnecessary-subscript-reversal(C415)unnecessary-map(C417)unnecessary-literal-within-dict-call(C418)unnecessary-comprehension-in-call(C419)
flake8-datetimez (DTZ)
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)
flake8-debugger (T10)
debugger(T100)
flake8-executable (EXE)
shebang-not-executable(EXE001)shebang-missing-executable-file(EXE002)shebang-leading-whitespace(EXE004)shebang-not-first-line(EXE005)
flake8-future-annotations (FA)
future-rewritable-type-annotation(FA100)future-required-type-annotation(FA102)
flake8-gettext (INT)
f-string-in-get-text-func-call(INT001)format-in-get-text-func-call(INT002)printf-in-get-text-func-call(INT003)
flake8-implicit-str-concat (ISC)
flake8-logging (LOG)
direct-logger-instantiation(LOG001)invalid-get-logger-argument(LOG002)undocumented-warn(LOG009)exc-info-outside-except-handler(LOG014)root-logger-call(LOG015)
flake8-logging-format (G)
logging-warn(G010)logging-extra-attr-clash(G101)logging-exc-info(G201)logging-redundant-exc-info(G202)
flake8-pie (PIE)
unnecessary-placeholder(PIE790)duplicate-class-field-definition(PIE794)non-unique-enums(PIE796)unnecessary-spread(PIE800)unnecessary-dict-kwargs(PIE804)reimplemented-container-builtin(PIE807)unnecessary-range-start(PIE808)multiple-starts-ends-with(PIE810)
flake8-pyi (PYI)
unprefixed-type-param(PYI001)complex-if-statement-in-stub(PYI002)unrecognized-version-info-check(PYI003)patch-version-comparison(PYI004)wrong-tuple-length-version-comparison(PYI005)bad-version-info-comparison(PYI006)unrecognized-platform-check(PYI007)unrecognized-platform-name(PYI008)pass-statement-stub-body(PYI009)non-empty-stub-body(PYI010)pass-in-class-body(PYI012)ellipsis-in-non-empty-class-body(PYI013)assignment-default-in-stub(PYI015)duplicate-union-member(PYI016)complex-assignment-in-stub(PYI017)unused-private-type-var(PYI018)custom-type-var-for-self(PYI019)quoted-annotation-in-stub(PYI020)unaliased-collections-abc-set-import(PYI025)type-alias-without-annotation(PYI026)str-or-repr-defined-in-stub(PYI029)unnecessary-literal-union(PYI030)any-eq-ne-annotation(PYI032)legacy-type-comment(PYI033)non-self-return-type(PYI034)unassigned-special-variable-in-stub(PYI035)bad-exit-annotation(PYI036)redundant-numeric-union(PYI041)snake-case-type-alias(PYI042)t-suffixed-type-alias(PYI043)future-annotations-in-stub(PYI044)iter-method-return-iterable(PYI045)unused-private-protocol(PYI046)unused-private-type-alias(PYI047)stub-body-multiple-statements(PYI048)unused-private-typed-dict(PYI049)no-return-argument-annotation-in-stub(PYI050)unannotated-assignment-in-stub(PYI052)unnecessary-type-union(PYI055)byte-string-usage(PYI057)generator-return-from-iter-method(PYI058)generic-not-last-base-class(PYI059)redundant-none-literal(PYI061)duplicate-literal-member(PYI062)pep484-style-positional-only-parameter(PYI063)redundant-final-literal(PYI064)bad-version-info-order(PYI066)
flake8-pytest-style (PT)
pytest-raises-without-exception(PT010)pytest-duplicate-parametrize-test-cases(PT014)pytest-deprecated-yield-fixture(PT020)pytest-erroneous-use-fixtures-on-fixture(PT025)pytest-use-fixtures-without-parameters(PT026)pytest-warns-with-multiple-statements(PT031)
flake8-return (RET)
unnecessary-return-none(RET501)
flake8-simplify (SIM)
duplicate-isinstance-call(SIM101)collapsible-if(SIM102)needless-bool(SIM103)return-in-try-except-finally(SIM107)enumerate-for-loop(SIM113)if-with-same-arms(SIM114)open-file-with-context-handler(SIM115)multiple-with-statements(SIM117)in-dict-keys(SIM118)negate-equal-op(SIM201)negate-not-equal-op(SIM202)double-negation(SIM208)if-expr-with-true-false(SIM210)if-expr-with-false-true(SIM211)expr-and-not-expr(SIM220)expr-or-not-expr(SIM221)expr-or-true(SIM222)expr-and-false(SIM223)if-else-block-instead-of-dict-get(SIM401)split-static-string(SIM905)zip-dict-keys-and-values(SIM911)
flake8-type-checking (TC)
runtime-import-in-type-checking-block(TC004)empty-type-checking-block(TC005)unquoted-type-alias(TC007)runtime-string-union(TC010)
flake8-use-pathlib (PTH)
py-path(PTH124)invalid-pathlib-with-suffix(PTH210)
flynt (FLY)
static-join-to-f-string(FLY002)
isort (I)
unsorted-imports(I001)
pep8-naming (N)
invalid-module-name(N999)
Perflint (PERF)
unnecessary-list-cast(PERF101)incorrect-dict-iterator(PERF102)manual-list-copy(PERF402)
pycodestyle (E, W)
bare-except(E722)io-error(E902)invalid-escape-sequence(W605)
pydocstyle (D)
empty-docstring(D419)
Pyflakes (F)
unused-import(F401)import-shadowed-by-loop-var(F402)late-future-import(F404)future-feature-not-defined(F407)percent-format-invalid-format(F501)percent-format-expected-mapping(F502)percent-format-expected-sequence(F503)percent-format-extra-named-arguments(F504)percent-format-missing-argument(F505)percent-format-mixed-positional-and-named(F506)percent-format-positional-count-mismatch(F507)percent-format-star-requires-sequence(F508)percent-format-unsupported-format-character(F509)string-dot-format-invalid-format(F521)string-dot-format-extra-named-arguments(F522)string-dot-format-extra-positional-arguments(F523)string-dot-format-missing-arguments(F524)string-dot-format-mixing-automatic(F525)f-string-missing-placeholders(F541)multi-value-repeated-key-literal(F601)multi-value-repeated-key-variable(F602)expressions-in-star-assignment(F621)multiple-starred-expressions(F622)assert-tuple(F631)is-literal(F632)invalid-print-syntax(F633)if-tuple(F634)break-outside-loop(F701)continue-outside-loop(F702)yield-outside-function(F704)return-outside-function(F706)default-except-not-last(F707)redefined-while-unused(F811)undefined-name(F821)undefined-export(F822)undefined-local(F823)unused-variable(F841)unused-annotation(F842)raise-not-implemented(F901)
pygrep-hooks (PGH)
invalid-mock-access(PGH005)
Pylint (PL)
type-name-incorrect-variance(PLC0105)type-bivariance(PLC0131)type-param-name-mismatch(PLC0132)single-string-slots(PLC0205)dict-index-missing-items(PLC0206)iteration-over-set(PLC0208)useless-import-alias(PLC0414)unnecessary-direct-lambda-call(PLC3002)yield-in-init(PLE0100)return-in-init(PLE0101)nonlocal-and-global(PLE0115)continue-in-finally(PLE0116)nonlocal-without-binding(PLE0117)load-before-global-declaration(PLE0118)invalid-length-return-type(PLE0303)invalid-bool-return-type(PLE0304)invalid-index-return-type(PLE0305)invalid-str-return-type(PLE0307)invalid-bytes-return-type(PLE0308)invalid-hash-return-type(PLE0309)invalid-all-object(PLE0604)invalid-all-format(PLE0605)potential-index-error(PLE0643)misplaced-bare-raise(PLE0704)repeated-keyword-argument(PLE1132)await-outside-async(PLE1142)logging-too-many-args(PLE1205)logging-too-few-args(PLE1206)bad-string-format-character(PLE1300)bad-string-format-type(PLE1307)bad-str-strip-call(PLE1310)invalid-envvar-value(PLE1507)singledispatch-method(PLE1519)singledispatchmethod-function(PLE1520)yield-from-in-async-function(PLE1700)bidirectional-unicode(PLE2502)invalid-character-backspace(PLE2510)invalid-character-sub(PLE2512)invalid-character-esc(PLE2513)invalid-character-nul(PLE2514)invalid-character-zero-width-space(PLE2515)comparison-with-itself(PLR0124)comparison-of-constant(PLR0133)property-with-parameters(PLR0206)manual-from-import(PLR0402)redefined-argument-from-local(PLR1704)stop-iteration-return(PLR1708)useless-return(PLR1711)boolean-chained-comparison(PLR1716)sys-exit-alias(PLR1722)if-stmt-min-max(PLR1730)unnecessary-dict-index-lookup(PLR1733)unnecessary-list-index-lookup(PLR1736)empty-comment(PLR2044)useless-else-on-loop(PLW0120)self-assigning-variable(PLW0127)redeclared-assigned-name(PLW0128)assert-on-string-literal(PLW0129)named-expr-without-context(PLW0131)useless-exception-statement(PLW0133)nan-comparison(PLW0177)bad-staticmethod-argument(PLW0211)super-without-brackets(PLW0245)import-self(PLW0406)global-variable-not-assigned(PLW0602)global-at-module-level(PLW0604)self-or-cls-assignment(PLW0642)binary-op-exception(PLW0711)bad-open-mode(PLW1501)shallow-copy-environ(PLW1507)invalid-envvar-default(PLW1508)subprocess-popen-preexec-fn(PLW1509)subprocess-run-without-check(PLW1510)useless-with-lock(PLW2101)
pyupgrade (UP)
useless-metaclass-type(UP001)type-of-primitive(UP003)useless-object-inheritance(UP004)deprecated-unittest-alias(UP005)non-pep585-annotation(UP006)non-pep604-annotation-union(UP007)super-call-with-parameters(UP008)utf8-encoding-declaration(UP009)unnecessary-future-import(UP010)lru-cache-without-parameters(UP011)unnecessary-encode-utf8(UP012)convert-named-tuple-functional-to-class(UP014)datetime-timezone-utc(UP017)native-literals(UP018)typing-text-str-alias(UP019)open-alias(UP020)replace-universal-newlines(UP021)replace-stdout-stderr(UP022)deprecated-c-element-tree(UP023)os-error-alias(UP024)unicode-kind-prefix(UP025)deprecated-mock-import(UP026)yield-in-for-loop(UP028)unnecessary-builtin-import(UP029)format-literals(UP030)printf-string-formatting(UP031)f-string(UP032)lru-cache-with-maxsize-none(UP033)extraneous-parentheses(UP034)deprecated-import(UP035)outdated-version-block(UP036)quoted-annotation(UP037)unnecessary-class-parentheses(UP039)non-pep695-type-alias(UP040)timeout-error-alias(UP041)unnecessary-default-type-args(UP043)non-pep646-unpack(UP044)non-pep604-annotation-optional(UP045)non-pep695-generic-class(UP046)non-pep695-generic-function(UP047)private-type-parameter(UP049)useless-class-metaclass-type(UP050)
refurb (FURB)
print-empty-string(FURB105)for-loop-writes(FURB122)readlines-in-for(FURB129)check-and-remove-from-set(FURB132)if-expr-min-max(FURB136)verbose-decimal-constructor(FURB157)bit-count(FURB161)fromisoformat-replace-z(FURB162)redundant-log-base(FURB163)int-on-sliced-str(FURB166)regex-flag-alias(FURB167)isinstance-type-none(FURB168)type-none-comparison(FURB169)implicit-cwd(FURB177)hashlib-digest-hex(FURB181)slice-to-remove-prefix-or-suffix(FURB188)sorted-min-max(FURB192)
Ruff-specific rules (RUF)
zip-instead-of-pairwise(RUF007)mutable-dataclass-default(RUF008)function-call-in-dataclass-default-argument(RUF009)explicit-f-string-type-conversion(RUF010)mutable-class-default(RUF012)implicit-optional(RUF013)unnecessary-iterable-allocation-for-first-element(RUF015)invalid-index-type(RUF016)quadratic-list-summation(RUF017)assignment-in-assert(RUF018)unnecessary-key-check(RUF019)never-union(RUF020)unsorted-dunder-all(RUF022)unsorted-dunder-slots(RUF023)mutable-fromkeys-value(RUF024)default-factory-kwarg(RUF026)invalid-formatter-suppression-comment(RUF028)assert-with-print-message(RUF030)decimal-from-float-literal(RUF032)post-init-default(RUF033)useless-if-else(RUF034)invalid-assert-message-literal-argument(RUF040)unnecessary-nested-literal(RUF041)unnecessary-cast-to-int(RUF046)map-int-version-parsing(RUF048)dataclass-enum(RUF049)if-key-in-dict-del(RUF051)class-with-mixed-type-vars(RUF053)unnecessary-round(RUF057)starmap-zip(RUF058)unused-unpacked-variable(RUF059)access-annotations-from-class-dict(RUF063)duplicate-entry-in-dunder-all(RUF068)unused-noqa(RUF100)redirected-noqa(RUF101)invalid-pyproject-toml(RUF200)
tryceratops (TRY)
raise-vanilla-class(TRY002)type-check-without-type-error(TRY004)verbose-raise(TRY201)useless-try-except(TRY203)verbose-log-message(TRY401)