-
-
Notifications
You must be signed in to change notification settings - Fork 145
/
Copy path.ruff.toml
40 lines (33 loc) · 1.48 KB
/
.ruff.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# The contents of this file is based on https://github.com/home-assistant/core/blob/dev/pyproject.toml
target-version = "py310"
select = ["ALL"]
# All the ones without a comment were the ones that are currently violated
# by the codebase. The plan is to fix them all (when sensible) and then enable them.
ignore = [
"ANN",
"ANN101", # Missing type annotation for {name} in method
"ANN401", # Dynamically typed expressions (typing.Any) are disallowed in {name}
"D401", # First line of docstring should be in imperative mood
"E501", # line too long
"FBT001", # Boolean positional arg in function definition
"FBT002", # Boolean default value in function definition
"FIX004", # Line contains HACK, consider resolving the issue
"PD901", # df is a bad variable name. Be kinder to your future self.
"PERF203", # `try`-`except` within a loop incurs performance overhead
"PLR0913", # Too many arguments to function call (N > 5)
"PLR2004", # Magic value used in comparison, consider replacing X with a constant variable
"S101", # Use of assert detected
"SLF001", # Private member accessed
]
[per-file-ignores]
"tests/*.py" = ["ALL"]
".github/*py" = ["INP001"]
"webapp/homeassistant_util_color.py" = ["ALL"]
"webapp/app.py" = ["INP001", "DTZ011", "A002"]
"custom_components/adaptive_lighting/homeassistant_util_color.py" = ["ALL"]
[flake8-pytest-style]
fixture-parentheses = false
[pyupgrade]
keep-runtime-typing = true
[mccabe]
max-complexity = 25