Skip to content

Commit 18339d9

Browse files
Enforce ruff/flake8-simplify rules (SIM)
1 parent ee0bdaa commit 18339d9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pyproject.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,7 @@ extend-select = [
262262
"PIE", # flake8-pie
263263
"TID", # flake8-tidy-imports (absolute imports)
264264
"PYI", # flake8-pyi
265+
"SIM", # flake8-simplify
265266
"FLY", # flynt
266267
"I", # isort
267268
"PERF", # Perflint
@@ -283,6 +284,10 @@ ignore = [
283284
"PIE790", # unnecessary pass statement
284285
"PYI019", # use `Self` instead of custom TypeVar
285286
"PYI041", # use `float` instead of `int | float`
287+
"SIM108", # use ternary operator instead of `if`-`else`-block
288+
"SIM117", # use a single `with` statement instead of nested `with` statements
289+
"SIM118", # use `key in dict` instead of `key in dict.keys()`
290+
"SIM300", # yoda condition detected
286291
"PERF203", # try-except within a loop incurs performance overhead
287292
"E402", # module level import not at top of file
288293
"E731", # do not assign a lambda expression, use a def

0 commit comments

Comments
 (0)