-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
101 lines (96 loc) · 3.64 KB
/
pyproject.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
[project]
name = "homeassistant-binary-sensor-predictor"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.12"
dependencies = []
[tool.uv]
dev-dependencies = ["homeassistant>=2024.9.2", "ruff>=0.6.6"]
[tool.ruff]
line-length = 100
target-version = "py312"
[tool.ruff.lint]
select = [
"F", # pyflakes
"E", # pycodestyle-errors
"W", # pycodestyle-warnings
"C90", # mccabe
"I", # isort
"N", # pep8-naming
"D", # pydocstyle
"UP", # pyupgrade
"YTT", # flake8-2020
"ANN", # flake8-annotations
"ASYNC", # flake8-async
"S", # flake8-bandit
"BLE", # flake8-blind-except
# "FBT", # flake8-boolean-trap (completely forbids bools in signatures)
"B", # flake8-bugbear
"A", # flake8-builtins
# "COM", # flake8-commas (trailing comma related rules)
# "CPY", # copyright-related rules (each file must have copyright info at top)
"C4", # flake8-comprehensions
"DTZ", # flake8-datetimez
"T10", # flake8-debugger
# "DJ", # flake8-django (rules for Django which we don't use)
# "EM", # flake8-errmsg (error messages must have preassigned variable names)
"EXE", # flake8-executable
"FA", # flake8-future-annotations
"ISC", # flake8-implicit-str-concat
"ICN", # flake8-import-conventions
"G", # flake8-logging-format
"INP", # flake8-no-pep420
"PIE", # flake8-pie
"T20", # flake8-print
"PYI", # flake8-pyi
"PT", # flake8-pytest-style
"Q", # flake8-quotes
"RSE", # flake8-raise
"RET", # flake8-return
"SLF", # flake8-self
"SLOT", # flake8-slots
"SIM", # flake8-simplify
"TID", # flake8-tidy-imports
"TCH", # flake8-type-checking
"INT", # flake8-gettext
"ARG", # flake8-unused-arguments
# "PTH", # flake8-use-pathlib (forbids the use of os in favor of pathlib)
"TD", # flake8-todos
"FIX", # flake8-fixme (forbids the use of TODO items)
"ERA", # eradicate
"PD", # pandas-vet
"PGH", # pygrep-hooks
"PL", # pylint
"TRY", # tryceratops
"FLY", # flynt
"NPY", # numpy-specific rules
# "AIR", # airflow-specific rules (rules for Airflow which we don't use)
"PERF", # perflint
"RUF", # ruff-specific rules
]
ignore = [
"D203", # 1 blank line required before class docstring (opposite of D211)
"D205", # 1 blank line required between summary line and description
"D212", # Multi-line docstring summary should start at the first line (opposite of D213)
"D400", # First line should end with a period
"D413", # Missing blank line after last section ("Returns")
"D415", # First line should end with a period, question mark, or exclamation point
"D401", # First line of docstring should be in imperative mood
"D407", # Missing dashed underline after section Args/Returns/Raises
"TRY003", # Avoid specifying long messages outside the exception class
"B028", # No explicit `stacklevel` keyword argument found for a `warnings.warn()` call
"D418", # Function decorated with `@overload` shouldn't contain a docstring
"PD011", # Use `.to_numpy()` instead of `.values`
"PT006", # Wrong name(s) type in `@pytest.mark.parametrize`, expected `tuple`
"TD002", # Missing author in TODO; try: `# TODO @<author_name>: ...`
"TD003", # Missing issue link on the line following this TODO
"ANN002", # Missing type annotation for `*args`
"ANN003", # Missing type annotation for `**kwargs`
"ANN101", # Missing type annotation for `self` in method
"ANN102", # Missing type annotation for `cls` in classmethod
"ANN204", # Missing return type annotation for special method `__init__`
"ISC001", # single-line-implicit-string-concatenation
]
[tool.pydocstyle]
convention = "google"