-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathpyproject.toml
More file actions
153 lines (136 loc) · 3.39 KB
/
Copy pathpyproject.toml
File metadata and controls
153 lines (136 loc) · 3.39 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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
[build-system]
requires = [
"hatchling",
"hatch-vcs",
"construct>=2.10.0",
"inflection>=0.5.1",
"frozendict",
]
build-backend = "hatchling.build"
[project]
name = "retro-data-structures"
description = "Construct file definitions for the Retro Studios game engine files"
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
]
requires-python = ">=3.12"
dependencies = [
"construct>=2.10.0",
"lzokay",
"pycryptodome",
"Pillow",
"typing-extensions>=4.0.0",
"ppc-asm",
"numpy",
]
dynamic = ["version"]
license = "GPL-3.0"
[project.readme]
file = "README.md"
content-type = "text/markdown"
[project.urls]
Homepage = "https://github.com/randovania/retro-data-structures"
[project.optional-dependencies]
test = [
"nod",
"pytest",
"pytest-cov",
"pytest-xdist",
# "pytest-asyncio",
# "pytest-mock",
"frozendict",
]
typing = [
"types-jsonschema",
"mypy",
"inflection>=0.5.1",
"frozendict",
]
[tool.hatch]
version.source = "vcs"
build.hooks.vcs.version-file = "src/retro_data_structures/version.py"
[tool.hatch.version.raw-options]
local_scheme = "no-local-version"
[tool.hatch.build.targets.sdist]
exclude = [
"tools/",
]
[tool.hatch.build.targets.wheel.hooks.custom]
path = "invoke_templates.py"
[tool.pytest.ini_options]
minversion = "6.0"
# asyncio_mode = "auto"
xfail_strict = true
empty_parameter_set_mark = "fail_at_collect"
filterwarnings = [
"error",
"ignore::DeprecationWarning",
]
markers = [
"skip_dependency_tests: Skips tests that involves calculating dependencies"
]
[tool.ruff]
line-length = 120
src = ["src"]
[tool.ruff.lint]
select = [
"E", "F", "W", "C90", "I", "UP", "C4",
"RSE",
"TCH",
"PTH",
"COM818", "COM819",
"ISC",
"PIE",
"PLC",
"PLE",
"PLR",
"PLW",
]
extend-ignore = [
"ISC001", # may cause conflicts with formatter
"PLR0913", # Too many arguments to function call
"PLR2004", # Magic values show up everywhere in construct defs
"PLC0415", # we defer imports for performance in a number of places
]
[tool.ruff.lint.mccabe]
# Flag errors (`C901`) whenever the complexity level exceeds 25.
# Defaults to 10, but we're being very flexible right now
max-complexity = 25
[tool.ruff.lint.isort]
required-imports = ["from __future__ import annotations"]
known-first-party = ["retro_data_structures"]
[tool.mypy]
files = [
"src/retro_data_structures/properties/",
"src/retro_data_structures/enums/",
"src/retro_data_structures/construct_extensions/wrapper_classes.py",
"src/retro_data_structures/transform.py",
"tests/properties/",
"parse_pwe_templates.py",
]
follow_imports = "silent"
disallow_untyped_defs = true
local_partial_types = true
warn_unused_ignores = true
enable_error_code = [
"ignore-without-code",
]
[[tool.mypy.overrides]]
# any dependencies which we do not control but are missing types go here
# not too much can be done about these, so they're not the end of the world
# dependencies we DO control should use `type: ignore[import-untyped]`
module = [
"construct.*",
]
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "tests.*"
disallow_untyped_defs = false
check_untyped_defs = true
disable_error_code = [
"method-assign",
]