-
Notifications
You must be signed in to change notification settings - Fork 133
/
pyproject.toml
187 lines (176 loc) · 4.17 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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
[tool.towncrier]
package = "galaxy_ng"
filename = "CHANGES.md"
directory = "CHANGES/"
title_format = "## {version} ({project_date}) {{: #{version} }}"
template = "CHANGES/.TEMPLATE.md"
issue_format = "[#{issue}](https://github.com/ansible/galaxy_ng/issues/{issue})"
start_string = "[//]: # (towncrier release notes start)\n"
underlines = ["", "", ""]
[tool.black]
line-length = 100
target-version = ["py36", "py37"]
exclude = '''
/(
\.eggs
| \.git
| \.venv
| _build
| build
| dist
| migrations
)/
'''
[tool.darker]
src = [
"galaxy_ng",
]
revision = "master"
isort = true
lint = [
"flake8 --config flake8.cfg",
]
log_level = "INFO"
line_length = 100
[tool.check-manifest]
ignore = [
".gitleaks.toml",
".bumpversion.cfg",
"CHANGES/**",
"CONTRIBUTING.rst",
"HISTORY.rst",
"dev_requirements.txt",
"doc_requirements.txt",
"functest_requirements.txt",
"unittest_requirements.txt",
"requirements/**",
"docs/**",
"galaxy_ng/tests/assets/**",
"flake8.cfg",
"template_config.yml",
".travis/**",
".travis.yml",
".flake8",
".pep8speaks.yml",
".ci/**",
".github/**",
"dev/**",
"docker/**",
"openshift/**",
"galaxy_ng/app/static/**",
".compose.env.example",
".dockerignore",
"COMMITMENT",
"Dockerfile",
"Dockerfile.rhel8",
"Makefile",
"ROADMAP.rst",
"ansible.cfg",
"build_deploy.sh",
"compose",
"pr_check.sh",
"lint_requirements.txt",
"profiles/**",
"galaxy_ng/_vendor/**",
]
[tool.coverage.run]
relative_files = true
data_file = "/tmp/.coverage"
omit = [
"galaxy_ng/_vendor/*",
"galaxy_ng/tests/*",
]
# ---------------------------------------------------------
# Ruff
# ---------------------------------------------------------
[tool.ruff]
line-length = 100
extend-exclude = [
"galaxy_ng/_vendor/",
]
[tool.ruff.lint]
select = [
# pyflakes
"F",
# pycodestyle errors
"E",
# pycodestyle warnings
"W",
# flake8-builtins
"A",
# flake8-bugbear
"B",
# flake8-comprehensions
"C4",
# flake8-commas
"COM",
# flake8-datetime
"DTZ",
# flake8-import-conventions
"ICN",
# flake8-executable
"EXE",
# flake8-no-pep420
"INP",
# flake8-gettext
"INT",
# flake8-logging
"LOG",
# pyupgrade
"UP",
# flake8-pie
"PIE",
# flake8-pytest-style
"PT",
# flake8-pyi
"PYI",
# ruff specific rules
"RUF",
# flake8-simplify
"SIM",
# flake8-debugger
"T10",
# flake8-todos
"TD"
]
extend-ignore = [
# B904 requires using `raise ... from ...` to explicitly tell what to do with "parent"
# exception. Would be nice to fix, but ignoring for now.
"B904",
# COM812 Trailing comma missing
# Too many changes to enforce
"COM812",
# UP032 Use f-string instead of `format` call.
# No need to replace all str.format usage with f-strings in entire codebase.
"UP032",
# PT004,PT005 are incorrect and deprecated
# See https://github.com/astral-sh/ruff/issues/8796
"PT004",
"PT005",
# PT009 Use a regular `assert` instead of unittest-style
# Ignoring, since we have mixed pytest and legacy unittest styled tests
"PT009",
# RUF012 Mutable class attributes should be annotated with `typing.ClassVar`
# We don't enforce type annotations at the moment.
"RUF012",
# RUF100 Unused `noqa` directive
# False positives on rules not enabled in ruff, but enabled in flake8.
"RUF100",
# SIM108 Use ternary operator instead of `if`-`else`-block
# Opinionated, ternary operators may reduce readability.
"SIM108",
# TD001 Invalid TODO tag
# We use TODO, FIXME and REVIEW tags
"TD001",
# TD003 Missing issue link on the line following this TODO
# We don't create issues for TODOs
"TD003",
]
[tool.ruff.lint.per-file-ignores]
# The `galaxy_ng` is the only top-level package. No other directory contains python packages.
"!galaxy_ng/**" = ["INP", "EXE"]
# Ignore "E501 Line too long" in migrations, since most of the warnings
# are due to autogenerated code.
"galaxy_ng/app/migrations/*" = ["E501"]
[tool.ruff.lint.flake8-builtins]
builtins-ignorelist = ["id"]