-
Notifications
You must be signed in to change notification settings - Fork 38
Expand file tree
/
Copy pathpyproject.toml
More file actions
56 lines (50 loc) · 1.55 KB
/
pyproject.toml
File metadata and controls
56 lines (50 loc) · 1.55 KB
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
[build-system]
requires = ["pbr>=6.0.0", "setuptools>=64.0.0"]
build-backend = "pbr.build"
[tool.ruff]
line-length = 79
target-version = "py310"
[tool.ruff.lint]
select = ["C90","E4", "E5", "E7", "E9", "F", "G", "I", "LOG","S", "UP", "W"]
external = ["H"]
ignore = [
# we only use asserts for type narrowing
"S101",
# we do not use random number geneerators for crypto
"S311",
# S104 Possible binding to all interfaces
"S104",
# S105 Possible hardcoded password assigned to variable"
"S105",
# S106 Possible hardcoded password assigned to argument
"S106",
# S110 `try`-`except`-`pass` detected, consider logging the exception
"S110",
# UP031 % format — defer f-string migration to a later pass
"UP031",
# UP032 f-string — defer migration to a later pass
"UP032",
]
[tool.ruff.lint.per-file-ignores]
"watcher/tests/*" = ["S"]
"watcher/db/sqlalchemy/alembic/*" = ["E501"]
"doc/*" = ["E501"]
[tool.ruff.lint.mccabe]
# Flag errors (`C901`) whenever the complexity level exceeds 5.
max-complexity = 20
[tool.bandit]
exclude_dirs = ['tests']
skips = ['B101', 'B311', 'B320']
[tool.ruff.lint.isort]
known-first-party = ["watcher"]
force-single-line = true
lines-after-imports = 2
lines-between-types = 1
section-order = ["future", "standard-library", "third-party", "first-party"]
# this is the default but just being explicit about the behavior
# in case that ever changes.
force-sort-within-sections = false
[tool.ruff.format]
quote-style = "preserve"
docstring-code-format = true
skip-magic-trailing-comma = true