chore: cleanup ruff flake8-simplify linter rules (#8286)

Co-authored-by: -LAN- <laipz8200@outlook.com>
This commit is contained in:
Bowen Liang
2024-09-12 12:55:45 +08:00
committed by GitHub
parent 0bb7569d46
commit 0f14873255
34 changed files with 108 additions and 136 deletions

View File

@ -17,14 +17,12 @@ select = [
"F", # pyflakes rules
"I", # isort rules
"N", # pep8-naming
"UP", # pyupgrade rules
"RUF019", # unnecessary-key-check
"RUF100", # unused-noqa
"RUF101", # redirected-noqa
"S506", # unsafe-yaml-load
"SIM116", # if-else-block-instead-of-dict-lookup
"SIM401", # if-else-block-instead-of-dict-get
"SIM910", # dict-get-with-none-default
"SIM", # flake8-simplify rules
"UP", # pyupgrade rules
"W191", # tab-indentation
"W605", # invalid-escape-sequence
]
@ -50,6 +48,15 @@ ignore = [
"B905", # zip-without-explicit-strict
"N806", # non-lowercase-variable-in-function
"N815", # mixed-case-variable-in-class-scope
"SIM102", # collapsible-if
"SIM103", # needless-bool
"SIM105", # suppressible-exception
"SIM107", # return-in-try-except-finally
"SIM108", # if-else-block-instead-of-if-exp
"SIM113", # eumerate-for-loop
"SIM117", # multiple-with-statements
"SIM210", # if-expr-with-true-false
"SIM300", # yoda-conditions
]
[tool.ruff.lint.per-file-ignores]