forked from canonical/cloud-init
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
77 lines (70 loc) · 2.03 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
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
[tool.black]
line-length = 79
include = '(brpm|bddeb|\.py)$'
[tool.isort]
profile = "black"
line_length = 79
# We patch logging in main.py before certain imports
skip = ["cloudinit/cmd/main.py", ".tox", "packages", "tools"]
[tool.mypy]
follow_imports = "silent"
warn_unused_ignores = "true"
warn_redundant_casts = "true"
exclude = []
[[tool.mypy.overrides]]
module = [
"apport.*",
"BaseHTTPServer",
"cloudinit.feature_overrides",
"configobj",
"debconf",
"httplib",
"jsonpatch",
"paramiko.*",
"pip.*",
"pycloudlib.*",
"responses",
"serial",
"tests.integration_tests.user_settings",
"uaclient.*",
]
ignore_missing_imports = true
[tool.ruff]
target-version = "py37"
line-length = 79
# E, W, and F make up the entirety of default flake8
lint.select = [
"D", # pydocstyle
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"T10", # flake8-debugger
"ISC", # flake8-implicit-str-concat
"ICN", # flake8-import-conventions
"G", # flake8-logging-format
"PIE", # flake8-pie
"Q", # flake8-quotes
]
lint.ignore = [
"D100", # docstring: public module
"D101", # docstring: public class required
"D102", # docstring: public method required
"D103", # docstring: public function required
"D107", # docstring: __init__ required
"D104", # docstring: public package required
"D105", # docstring: magic method required
"D200", # docstring: one line docstring shouldn't wrap
"D202", # docstring: blank line
"D205", # docstring: 1 blank line between initial and summary
"D209", # docstring: closing quotes -> separate line
"D400", # docstring: end with a period
"D401", # docstring: imperative mood
"D402", # docstring: docstring shouldn't start with func signature
"D403", # docstring: capitalized first line
"E731", # Do not assign a `lambda` expression, use a `def`
]
[tool.ruff.lint.pydocstyle]
convention = "pep257"