-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
97 lines (81 loc) · 2.6 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
[tool.isort]
profile = 'black'
[tool.pylint.BASIC]
ignore = [
"tests",
]
ignore-paths = []
#init-hook='import sys; sys.path.append("XXXXXX")'
load-plugins = [
"pylint.extensions.code_style",
"pylint.extensions.typing",
]
class-const-naming-style = "any"
good-names = [
"id",
"_",
"ip",
"rc",
"batteryInputFromGrid",
"batteryOutputExported",
"batteryInputFromSolar",
"batteryOutputConsumedByHome",
"homeConsumed",
"solarExported",
"gridConsumedByHome",
"solarConsumedByHome",
"solarGenerated",
"solarConsumption",
]
[tool.pylint."MESSAGES CONTROL"]
disable = [
"format",
"line-too-long",
"import-error",
"logging-fstring-interpolation",
]
[tool.pylint."SIMILARITY"]
min-similarity-lines = 50
[tool.pylint."DESIGN"]
max-locals = 20
[tool.ruff]
target-version = "py310"
select = [
"B007", # Loop control variable {name} not used within loop body
"B014", # Exception handler with duplicate exception
"C", # complexity
"D", # docstrings
"E", # pycodestyle
"F", # pyflakes/autoflake
"ICN001", # import concentions; {name} should be imported as {asname}
"PGH003", # Use specific rule codes when using type: ignore
"PGH004", # Use specific rule codes when using noqa
"PLC0414", # Useless import alias. Import alias does not rename original package.
"PLC3002", # Compare to empty string
"SIM105", # Use contextlib.suppress({exception}) instead of try-except-pass
"SIM117", # Merge with-statements that use the same scope
"SIM118", # Use {key} in {dict} instead of {key} in {dict}.keys()
"SIM201", # Use {left} != {right} instead of not {left} == {right}
"SIM212", # Use {a} if {a} else {b} instead of {b} if not {a} else {a}
"SIM300", # Yoda conditions. Use 'age == 42' instead of '42 == age'.
"SIM401", # Use get from dict with default instead of an if block
"T20", # flake8-print
"TRY004", # Prefer TypeError exception for invalid type
"UP", # pyupgrade
"W", # pycodestyle
]
ignore = [
"D203", # 1 blank line required before class docstring
"D213", # Multi-line docstring summary should start at the second line
"D406", # Section name should end with a newline
"D407", # Section name underlining
"E501", # line too long
"E731", # do not assign a lambda expression, use a def
# Ignored due to performance: https://github.com/charliermarsh/ruff/issues/2923
"UP038", # Use `X | Y` in `isinstance` call instead of `(X, Y)`
]
[tool.ruff.pydocstyle]
convention = "google"
[tool.ruff.per-file-ignores]
[tool.ruff.mccabe]
max-complexity = 25