Skip to content

Commit 6faaa2b

Browse files
Enforce ruff/flake8-simplify rules (SIM)
1 parent 0cae3ef commit 6faaa2b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,7 @@ extend-select = [
255255
"PIE", # flake8-pie
256256
"TID", # flake8-tidy-imports (absolute imports)
257257
"PYI", # flake8-pyi
258+
"SIM", # flake8-simplify
258259
"FLY", # flynt
259260
"I", # isort
260261
"PERF", # Perflint
@@ -276,6 +277,9 @@ ignore = [
276277
"PIE790", # unnecessary pass statement
277278
"PYI019", # use `Self` instead of custom TypeVar
278279
"PYI041", # use `float` instead of `int | float`
280+
"SIM108", # use ternary operator instead of `if`-`else`-block
281+
"SIM117", # use a single `with` statement instead of nested `with` statements
282+
"SIM300", # yoda condition detected
279283
"PERF203", # try-except within a loop incurs performance overhead
280284
"E402", # module level import not at top of file
281285
"E731", # do not assign a lambda expression, use a def

0 commit comments

Comments
 (0)