-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathpyproject.toml
More file actions
114 lines (107 loc) · 2.4 KB
/
pyproject.toml
File metadata and controls
114 lines (107 loc) · 2.4 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
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
102
103
104
105
106
107
108
109
110
111
112
113
114
## Lint tools ##
# DARKER
# Darker runs black, isort and flynt, but only on new code.
# This pevent a whole file reformating. We should enforce this on new PR.
[tool.darker]
src = [
"lib/aquilon",
"bin",
"sbin",
"tests"
]
revision = "master"
diff = false
check = false
isort = false
line-length = 120
line_length = 120 # bug in current version 1.7.2, line-length is sometimes ignored.
log_level = "INFO"
workers = 0
target-version = 'py310'
target_version = 'py310' # bug in current version 1.7.2, target-version is sometimes ignored.
[tool.black]
line-length = 120
skip-string-normalization = true
target-version = ['py310']
exclude = '''
/(
\.eggs # exclude a few common directories in the
| \.git # root of the project
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| _build
| buck-out
| build
| dist
| msde-train
| venv
| etc
| __pycache__
| .*\.ya?ml$
| Makefile$
| .*\.toml$
| .*\.pyi$
| .*\.pyc$
)/
'''
force-exclude = '''.*?(?:\.ya?ml|Makefile|\.toml|\.pyi|\.sh)$'''
[tool.isort]
atomic = true
profile = "black"
line_length = 120
known_third_party = ["sqlalchemy", "twisted"]
[tool.ruff]
target-version = "py310"
exclude = [
".eggs",
".git",
".mypy_cache",
".nox",
".pants.d",
".ruff_cache",
".tox",
".venv",
"build",
"venv",
"tools",
"upgrade",
"test",
"tests",
"fakebin",
"sbin",
"etc"
]
# Same as Black.
line-length = 120
# Enumerate all fixed violations.
show-fixes = true
[tool.ruff.lint]
select = [
"ARG", # flake8-unused-argument
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"E", # pycodestyle errors
"F", # pyflakes
"FLY", # flynt
"I", # isort
"PIE", # flake8-pie
"PL", # ruff's pylint
"UP", # pyupgrade
"W", # pycodestyle warnings
]
ignore = [
"E501", # line too long, handled by black
"E402", # Module level import not at top of file - as is with ms.version
"ARG002", # Unused method argument : too many in aqd
"PLR0912", # Too many branches : too many in aqd
"PLR0913", # Too many arguments to function call : too many in aqd
"PLR0915", # Too many statements : too many in aqd
]
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
# Avoid trying to fix flake8-bugbear (`B`) violations.
unfixable = ["B"]
[tool.ruff.lint.isort]
known-third-party = ["sqlalchemy", "twisted"]