-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathruff-base.toml
62 lines (46 loc) · 1.79 KB
/
ruff-base.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
# SPDX-FileCopyrightText: 2021 - 2024 StorPool <[email protected]>
# SPDX-License-Identifier: BSD-2-Clause
target-version = "py38"
line-length = 100
[lint]
select = []
ignore = [
# No blank lines before the class docstring, TYVM
"D203",
# The multi-line docstring summary starts on the same line
"D213",
# Too restrictive.
"EM",
# The /x regex modifier is common enough in many languages
"FURB167",
# We want to report exceptions with as much context as possible.
"PERF203",
# Maybe we shall fix the use of magic values... some sunny day.
"PLR2004",
# Too restrictive for now.
"TRY003",
]
[lint.flake8-copyright]
notice-rgx = "(?x) SPDX-FileCopyrightText: \\s \\S"
[lint.isort]
force-single-line = true
known-first-party = ["sp_build_repo", "sp_variant", "test_docker"]
lines-after-imports = 2
single-line-exclusions = ["defs", "typing"]
[lint.per-file-ignores]
# This is a command-line tool. Console output is part of its task.
# Also, it needs to be able to run typedload on Python < 3.10, so it cannot
# leverage the full power of X | Y unions, X | None optional values, etc.
# We also make sure to use `subprocess` responsibly.
"*/sp_build_repo/__main__.py" = ["S404", "S603", "S607", "T201", "UP006", "UP007"]
# This is a command-line tool. Console output is part of its task.
# We also make sure to use `subprocess` responsibly.
"*/sp_variant/__main__.py" = ["S404", "S603", "S607", "T201"]
# We only run commands defined in our variants structure.
"*/sp_variant/variant.py" = ["S404", "S603", "S607"]
# The "update a named tuple / dictionary functions need to use typing.Any.
"*/sp_variant/vbuild.py" = ["ANN401"]
# We make sure to use `subprocess` responsibly.
"*/test_docker/__main__.py" = ["S404", "S603", "S607"]
# This is a test suite.
"*/unit_tests/*.py" = ["S101", "T201"]