forked from basnijholt/adaptive-lighting
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.ruff.toml
58 lines (52 loc) · 2.57 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# The contents of this file is based on https://github.com/home-assistant/core/blob/dev/pyproject.toml
target-version = "py310"
[lint]
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
]
[lint.per-file-ignores]
"tests/*.py" = [
"ARG001", # Unused function argument: `call`
"D100", # Missing docstring in public module
"D103", # Missing docstring in public function
"D205", # 1 blank line required between summary line and description
"D400", # First line should end with a period
"D415", # First line should end with a period, question mark, or
"DTZ001", # The use of `datetime.datetime()` without `tzinfo`
"ERA001", # Found commented-out code
"FBT003", # Boolean positional value in function call
"FIX002", # Line contains TODO, consider resolving the issue
"G004", # Logging statement uses f-string
"PLR0915", # Too many statements (94 > 50)
"PT004", # Fixture `cleanup` does not return anything, add leading underscore
"PT007", # Wrong values type in `@pytest.mark.parametrize` expected `list` of
"S311", # Standard pseudo-random generators are not suitable for cryptographic
"TD002", # Missing author in TODO; try: `# TODO(<author_name>): ...` or `# TODO
"TD003", # Missing issue link on the line following this TODO
]
".github/*py" = ["INP001"]
"webapp/homeassistant_util_color.py" = ["ALL"]
"webapp/app.py" = ["INP001", "DTZ011", "A002"]
"custom_components/adaptive_lighting/homeassistant_util_color.py" = ["ALL"]
[lint.flake8-pytest-style]
fixture-parentheses = false
[lint.pyupgrade]
keep-runtime-typing = true
[lint.mccabe]
max-complexity = 25