ruff: Enable more rules.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2024-02-29 16:54:12 -08:00 committed by Tim Abbott
parent 2655fe7182
commit f618971668
1 changed files with 7 additions and 0 deletions

View File

@ -120,6 +120,7 @@ select = [
"I", # import sorting "I", # import sorting
"INT", # gettext "INT", # gettext
"ISC", # string concatenation "ISC", # string concatenation
"LOG", # logging
"N", # naming "N", # naming
"PERF", # performance "PERF", # performance
"PGH", # pygrep-hooks "PGH", # pygrep-hooks
@ -130,8 +131,11 @@ select = [
"RSE", # raise "RSE", # raise
"RUF", # Ruff "RUF", # Ruff
"S", # security "S", # security
"SLOT", # __slots__
"SIM", # simplify "SIM", # simplify
"T10", # debugger "T10", # debugger
"TCH", # type-checking
"TID", # tidy imports
"UP", # upgrade "UP", # upgrade
"W", # style warnings "W", # style warnings
"YTT", # sys.version "YTT", # sys.version
@ -185,6 +189,9 @@ ignore = [
"SIM114", # Combine `if` branches using logical `or` operator "SIM114", # Combine `if` branches using logical `or` operator
"SIM117", # Use a single `with` statement with multiple contexts instead of nested `with` statements "SIM117", # Use a single `with` statement with multiple contexts instead of nested `with` statements
"SIM401", # Use `d.get(key, default)` instead of an `if` block "SIM401", # Use `d.get(key, default)` instead of an `if` block
"TCH001", # Move application import into a type-checking block
"TCH002", # Move third-party import into a type-checking block
"TCH003", # Move standard library import into a type-checking block
] ]
[tool.ruff.lint.flake8-gettext] [tool.ruff.lint.flake8-gettext]