Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
131 lines (127 loc) · 3.05 KB
/
Copy pathpyproject.toml
File metadata and controls
131 lines (127 loc) · 3.05 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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
#
# SPDX-License-Identifier: MPL-2.0
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, you can obtain one at https://mozilla.org/MPL/2.0/.
#
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
[tool.pylint.basic]
good-names-rgxs = [
# Allow names from KASP tests
"I(pub|ret)C?",
"T(act|pub|ret|rem|sbm)N1?",
]
[tool.pylint.imports]
deprecated-modules = [
"dns.resolver",
]
[tool.pylint.messages_control]
disable = [
"C0114", # missing-module-docstring
"C0115", # missing-class-docstring
"C0116", # missing-function-docstring
"C0301", # line-too-long, handled better by black
"C0302", # too-many-lines
"R0801", # duplicate-code
"R0902", # too-many-instance-attributes
"R0903", # too-few-public-methods
"R0912", # too-many-branches
"R0913", # too-many-arguments
"R0914", # too-many-locals
"R0915", # too-many-statements
"R0917", # too-many-positional-arguments
]
[tool.pylint.main]
ignore-paths = [
".git",
# Temporary directories created by the system test runner
# (see bin/tests/system/conftest.py:system_test_dir)
"bin/tests/system/.*-tmp-.*/",
"bin/tests/system/vulture_ignore_list.py",
"contrib",
"dangerfile.py",
"doc/arm/conf.py",
"doc/man/conf.py",
]
# Both `init-hook` and `source-roots` are needed to avoid import errors,
# enable plugin loading and calling pylint from CI as `pylint $(git ls-files '*.py')`
init-hook = "import sys; sys.path.extend(('bin/tests/system', 'doc/misc', 'doc/arm/_ext'));"
source-roots = [
"bin/tests/system",
"doc/misc",
"doc/arm/_ext",
]
load-plugins = [
"re_compile_checker",
"dns_import_checker",
"docstring_format_checker",
"file_header_checker",
]
[tool.vulture]
paths = [
".",
]
exclude = [
"*ans.py",
"*/ans[0-9]*/*",
"contrib",
"*doc/arm/_ext/*conf.py",
"doc/arm/conf.py",
"doc/man/conf.py",
"isctest",
"re_compile_checker.py",
"dns_import_checker.py",
"docstring_format_checker.py",
"file_header_checker.py",
]
ignore_decorators = [
"@pytest.fixture",
]
ignore_names = [
"pytest*",
# attributes of `isctest.kasp.KeyProperties` set but later not read in:
# - bin/tests/system/kasp/tests_kasp.py
# - bin/tests/system/multisigner/tests_multisigner.py
# - bin/tests/system/nsec3/common.py
# - bin/tests/system/rollover-multisigner/tests_rollover_multisigner.py
"private",
"legacy",
"ednsflags",
]
[tool.ruff]
target-version = "py310"
lint.select = [
# import order
"I",
# unused imports
"F401",
# sorted __all__
"RUF022",
# unnecessary `typing` imports
"UP006",
"UP007",
"UP035",
"UP045",
# f-strings
"UP031",
"UP032",
]
extend-exclude = [
"bin/tests/system/vulture_ignore_list.py",
"contrib",
"dangerfile.py",
"doc/arm/conf.py",
"doc/man/conf.py",
]
src = [
"bin/tests/system",
"doc/misc",
"doc/arm/_ext",
]
[tool.ruff.lint.isort]
from-first = true
lines-between-types = 1
split-on-trailing-comma = false