mirror of
https://github.com/esphome/esphome.git
synced 2024-12-03 12:14:13 +01:00
[code-quality] Add some ruff configuration (#7103)
This commit is contained in:
parent
b32078a5fe
commit
0fb89d1869
1 changed files with 30 additions and 0 deletions
|
@ -105,3 +105,33 @@ disable = [
|
||||||
|
|
||||||
[tool.pylint.FORMAT]
|
[tool.pylint.FORMAT]
|
||||||
expected-line-ending-format = "LF"
|
expected-line-ending-format = "LF"
|
||||||
|
|
||||||
|
[tool.ruff]
|
||||||
|
required-version = ">=0.5.0"
|
||||||
|
|
||||||
|
[tool.ruff.lint]
|
||||||
|
select = [
|
||||||
|
"E", # pycodestyle
|
||||||
|
"F", # pyflakes/autoflake
|
||||||
|
"I", # isort
|
||||||
|
"PL", # pylint
|
||||||
|
"UP", # pyupgrade
|
||||||
|
]
|
||||||
|
|
||||||
|
ignore = [
|
||||||
|
"E501", # line too long
|
||||||
|
"PLR0911", # Too many return statements ({returns} > {max_returns})
|
||||||
|
"PLR0912", # Too many branches ({branches} > {max_branches})
|
||||||
|
"PLR0913", # Too many arguments to function call ({c_args} > {max_args})
|
||||||
|
"PLR0915", # Too many statements ({statements} > {max_statements})
|
||||||
|
"PLR2004", # Magic value used in comparison, consider replacing {value} with a constant variable
|
||||||
|
"PLW2901", # Outer {outer_kind} variable {name} overwritten by inner {inner_kind} target
|
||||||
|
]
|
||||||
|
|
||||||
|
[tool.ruff.lint.isort]
|
||||||
|
force-sort-within-sections = true
|
||||||
|
known-first-party = [
|
||||||
|
"esphome",
|
||||||
|
]
|
||||||
|
combine-as-imports = true
|
||||||
|
split-on-trailing-comma = false
|
||||||
|
|
Loading…
Reference in a new issue