forked from teemtee/tmt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
115 lines (105 loc) · 3.21 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
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
[tool.mypy]
# Be vewy, vewy stwict, we'we hunting wabbits^Wbugs.
strict = true
# Automagically make imported object part of mypy's view of module's namespace.
implicit_reexport = true
# Make error messages more rich, this helps better targeted waivers.
show_error_codes = true
# Allow mypy to follow imports to get correct picture of type
# annotations across module boundaries.
follow_imports = "normal"
python_version = "3.7"
files = ["bin/tmt", "tmt/", "setup.py"]
[[tool.mypy.overrides]]
module = [
"bugzilla.*",
"gssapi.*",
"guestfs.*",
"html2text.*",
"fmf.*",
"junit_xml.*",
"libvirt.*",
"nitrate.*",
"pylero.*",
"testcloud.*",
"importlib_metadata",
"mrack.*",
]
ignore_missing_imports = true
# code is currently formatted with default isort config
#[tool.isort]
#line_length = 99
#py_version = 37
[tool.autopep8]
max_line_length = 99
in-place = true
recursive = true
hang-closing = true
aggressive = 2
[tool.pep8]
max-line-length = "99"
[tool.ruff]
line-length = 99
src = ["tmt", "tests", "bin"]
target-version = "py37"
select = [
"F", # pyflakes
"E", # pycodestyle
"W", # pycodestyle
# "C90", # mccabe
# "I", # isort
# "N", # pep8-naming
# "UP", # pyupgrade
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"YTT", # flake8-2020
# "ANN", # flake8-annotations
# "S", # flake8-bandit
# "ISC", # flake8-implicit-str-concat
# "PT", # flake8-pytest-style
# "RET", # flake8-return
# "SIM", # flake8-simplify
# "ARG", # flake8-unused-arguments
# "BLE", # flake8-blind-except
# "FBT", # flake8-boolean-trap
# "A", # flake8-builtins
"COM", # flake8-commas
# "C4", # flake8-comprehensions
"DTZ", # flake8-datetimez
"T10", # flake8-debugger
# "EM", # flake8-errmsg
"EXE", # flake8-executable
# "ISC", # flake8-implicit-str-concat
# "G", # flake8-logging-format
# "PIE", # flake8-pie
# "T20", # flake8-print
# "PT", # flake8-pytest-style
# "Q", # flake8-quotes
# "RSE", # flake8-raise
# "RET", # flake8-return
# "SLF", # flake8-self
# "SIM", # flake8-simplify
# "TCH", # flake8-type-checking
"PGH", # pygrep-hooks
# "PLC", # pylint-convention
# "PLE", # pylint-error
# "PLR", # pylint-refactor
# "PLW", # pylint-warning
# "TRY", # tryceratops
"RUF", # ruff
]
ignore = [
"C408", # Unnecessary `dict` call (rewrite as a literal)
"C416", # Unnecessary `list` comprehension (rewrite using `list()`)
"C401", # Unnecessary generator (rewrite as a `set` comprehension)
"C405", # Unnecessary `list` literal (rewrite as a `set` literal)
"B904", # Within an `except` clause, raise exceptions with `raise ... from err` or `raise ...
"B00", # B00{1..9}
"B011", # Do not `assert False` (`python -O` removes these calls), raise `AssertionError()`
"B012", # return` inside `finally` blocks cause exceptions to be silenced
"B018", # Found useless expression. Either assign it to a variable or remove it.
"COM812", # Trailing comma missing
"RUF005", # collection-literal-concatenation - Consider {expr} instead of concatenation
]
[tool.ruff.per-file-ignores]
"tmt/steps/report/polarion.py" = ["DTZ005"]