forked from Open-Wine-Components/umu-launcher
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
264 lines (249 loc) · 6.46 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
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[lint.per-file-ignores]
"umu_test.py" = ["ANN"]
"umu_test_plugins.py" = ["ANN"]
[project]
name = "umu-launcher"
dynamic = ["version"]
description = "Unified Linux Wine Game Launcher."
authors = [
{name = "GloriousEggroll", email = "[email protected]"},
{name = "Mathieu Comandon", email = "[email protected]"},
{name = "Paweł Lidwin", email = "[email protected]"},
{name = "mirkobrombin", email = "[email protected]"},
{name = "Flavio F Lima", email = "[email protected]"}
]
maintainers = [
{name = "GloriousEggroll", email = "[email protected]"},
{name = "R1kaB3rN", email = "[email protected]"}
]
requires-python = ">=3.10"
license = {file = "README.md"}
keywords = [
"umu",
"umu-launcher"
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: End Users/Desktop",
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Software Development :: Libraries :: Python Modules"
]
urls = {repository = "https://github.com/Open-Wine-Components/umu-launcher"}
dependencies = [
"python-xlib>=0.33",
"filelock>=3.9.0"
]
[project.scripts]
umu-run = "umu.__main__:main"
[tool.hatch.build.targets.sdist]
exclude = [
"/.github",
"/.git",
"/umu/__pycache__",
"/.mypy_cache",
"/.ruff_cache"
]
[tool.hatch.build.targets.wheel]
packages = ["umu"]
exclude = [
"/umu/umu-launcher",
"/umu/__pycache__",
"/umu/ruff.toml",
"/umu/umu_version.json.in",
"/umu/umu-run.in",
"/umu/umu_test.py",
"/umu/umu_test_plugins.py"
]
[tool.hatch.version]
path = "umu/__init__.py"
[tool.isort]
profile = "black"
py_version = 312
[tool.mypy]
python_version = "3.10"
warn_return_any = true
ignore_missing_imports = true
disable_error_code = [
# Allow redefinitions since we redefine an error variable before raising exceptions
"no-redef"
]
exclude = [
'umu/umu_test.py',
'umu/umu_test_plugins.py',
'subprojects',
'builddir',
'dist'
]
[tool.pdm]
distribution = true
[tool.pdm.dev-dependencies]
dev = [
"black>=24.4.2",
"GitPython>=3.1.40",
"isort>=5.13.2",
"mypy>=1.10.0",
"ruff>=0.4.2",
"toml-sort>=0.23.1",
"types-PyYAML>=6.0.12.20240311"
]
[tool.pdm.scripts]
# static analysis
format = {composite = [
"black umu/ tests/",
"isort --settings-path ./pyproject.toml umu/ tests/",
"toml-sort -i ./pyproject.toml"
]}
lint-fix = "ruff check --config ./pyproject.toml . --fix"
type-check = "mypy --config-file ./pyproject.toml --enable-incomplete-feature=NewGenericSyntax umu/"
[tool.pdm.version]
fallback_version = "0.0.0"
source = "scm"
write_template = "__version__: str = \"{}\"\n"
write_to = "code_review/_version.py"
[tool.ruff]
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".ipynb_checkpoints",
".mypy_cache",
".nox",
".pants.d",
".pyenv",
".pytest_cache",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
".vscode",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"site-packages",
"venv",
"builddir",
"subprojects"
]
# Same as Black.
line-length = 79
indent-width = 4
target-version = "py310"
[tool.ruff.format]
# Like Black, use double quotes for strings.
quote-style = "double"
# Like Black, indent with spaces, rather than tabs.
indent-style = "space"
# Like Black, respect magic trailing commas.
skip-magic-trailing-comma = false
# Like Black, automatically detect the appropriate line ending.
line-ending = "auto"
# Enable auto-formatting of code examples in docstrings. Markdown,
# reStructuredText code/literal blocks and doctests are all supported.
#
# This is currently disabled by default, but it is planned for this
# to be opt-out in the future.
docstring-code-format = false
# Set the line length limit used when formatting code snippets in
# docstrings.
#
# This only has an effect when the `docstring-code-format` setting is
# enabled.
docstring-code-line-length = "dynamic"
[tool.ruff.lint]
select = [
# Ruff defaults
"E4",
"E7",
"E9",
"F",
# Ensure we're being smart when raising, returning or breaking
"RET",
# Enforce pydocstyle
"W",
# Enforce more formats
# See https://docs.astral.sh/ruff/rules/#warning-w
"D",
# Enforce pathlib when working with paths
"PTH",
# Ensure exceptions are not blindly caught
"BLE001",
# Enforce flake8 error messages
"EM",
# Ensure we're being smart when working with archives/executing shell commands
# Or when dealing with input returned from web services (e.g., Github)
"S",
# Ensure we do not exceed our line length
"E501",
# Enforce types for variables
"ANN",
# Ensure we're smart when accessing dicts
"RUF019",
# Enforce not concatenating collections
"RUF005",
# Flag unused qa directives
"RUF100",
# Enforce flake8 concat strings because the + operator can be unnecessary
"ISC",
# Ensure we're smart when using the logger
# Specific log statements should execute only when necessary
"G",
# Prefer collapsing nested if-elif in the else branch
"PLR5501",
# Simply and catch redundant logic
"SIM",
# Ensure no useless arguments/paramaters
"ARG",
# Ensure explicit check= for subprocess.run to avoid silent failures
"PLW1510",
"UP",
"FURB",
# Sort imports
"I",
# Ensure we're smart when using list comprehensions
"C4",
# Ensure we do not shadow any Python built-in functionality
"A"
]
ignore = [
# Format
"D100",
"D203",
"D213",
"E501",
# Ignore untrusted input for subprocess
# This raises false negatives and currently we shell out when:
# Using Zenity or executing the final command
# In the above cases, we *always* verify the existence of the command/files
"S603",
# We use a static location for the crash report dir: /tmp/umu_crashreports
"S108",
# Don't flag missing type for self
# This will be deprecated in Ruff soon
"ANN101",
"ANN201",
# Single line implicit concat conflicts with the formatter
"ISC001",
"S404"
]
# Allow fix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
unfixable = []
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
logger-objects = ["umu.umu_log.log"]