-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
150 lines (128 loc) · 3.99 KB
/
pyproject.toml
File metadata and controls
150 lines (128 loc) · 3.99 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
[project]
name = "Yurei"
description = "Phasmophobia save editor."
authors = [{ name = "Alex Nørgaard", email = "umbra@abstractumbra.dev" }]
dependencies = ["pycryptodome>=3.23.0,<4", "textual[syntax]>=6.3.0,<7"]
requires-python = "<4.0,>=3.14"
readme = "README.md"
license = "AGPL-3.0-or-later"
license-files = ["LICEN[CS]E"]
keywords = ["phasmophobia", "save", "save-editor"]
classifiers = [
"Intended Audience :: End Users/Desktop",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.14",
"Topic :: Games/Entertainment",
"Topic :: Games/Entertainment :: Role-Playing",
"Typing :: Typed",
]
dynamic = ["version"]
[project.urls]
"Issue Tracker" = "https://github.com/AbstractUmbra/Yurei/issues"
Discord = "https://discord.gg/aYGYJxwqe5"
Repository = "https://github.com/AbstractUmbra/Yurei"
[project.scripts]
yurei = "yurei.tui:entry"
yurei-web = "yurei.tui:web_entry"
[project.optional-dependencies]
speed = ["orjson>=3.11.3"]
web = ["textual-serve>=1.1.2,<2"]
[dependency-groups]
dev = ["ruff==0.14.1", "textual-dev>=1.8.0,<2"]
[tool.uv]
package = true
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.metadata]
# direct dependency references, e.g `pip @ git+https://github.com/pypa/pip.git@master`
allow-direct-references = true
[tool.hatch.version]
path = "yurei/__init__.py"
[tool.hatch.build]
dev-mode-dirs = ["."]
ignore-vcs = true
[tool.hatch.build.targets.sdist]
exclude = ["docs", ".github", ".venv", ".ruff_cache", "dist"]
include = ["yurei/*", "css/*", "resources/*", "LICENSE"]
skip-excluded-dirs = false
[tool.hatch.build.targets.wheel]
packages = ["./yurei"]
[[tool.uv.index]]
name = "umbra"
url = "https://about.abstractumbra.dev/pip/"
explicit = true
[tool.ruff]
line-length = 125
target-version = "py314"
extend-exclude = ["preflight/get_xp_scaling.py"] # it's a one time runner
[tool.ruff.lint]
preview = true
select = ["ALL"]
ignore = [
"ANN401",
"ASYNC240", # i dont like trio/anyio
"C901",
"COM812",
"CPY001",
"D", # not needed here
"DOC",
"EM101", # in this case this is okay
"F401",
"F402",
"F403",
"F405",
"INP001", # due to how I load modules this results in annoyances
"PD011", # this is not a numpy codebase
"PERF203",
"PLC0414", # pyright ruling for `as` imports needed
"PLR0912",
"PLR0913",
"PLR2004", # I hate this rule
"PLR6301",
"Q000",
"RUF001",
"RUF009",
"S101", # assert is used for type checking in this codebase
"SLF001",
"SIM105",
"TRY003", # over-eager rule
"TRY301", # unrealistic rule
"UP034",
]
unfixable = [
"E501", # line length handled in other ways by ruff format
"ERA", # Don't delete commented out code
]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
[tool.ruff.lint.isort]
split-on-trailing-comma = true
combine-as-imports = true
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.ruff.lint.flake8-annotations]
allow-star-arg-any = true
[tool.ruff.lint.flake8-pytest-style]
fixture-parentheses = false
mark-parentheses = false
parametrize-names-type = "csv"
[tool.ruff.lint.flake8-quotes]
inline-quotes = "double"
[tool.ruff.lint.flake8-tidy-imports.banned-api]
# https://discuss.python.org/t/problems-with-typeis/55410/6
# https://discuss.python.org/t/problems-with-typeis/55410/46
# Until what can go into a TypeIs/TypeGuard changes, these are just dangerous.
"typing.TypeIs".msg = "TypeIs is fundamentally unsafe, even when using it as described to be safe"
"typing.TypeGuard".msg = "TypeGuard is fundamentally unsafe"
"typing_extensions.TypeIs".msg = "TypeIs is fundamentally unsafe, even when using it as described to be safe"
"typing_extensions.TypeGuard".msg = "TypeGuard is fundamentally unsafe"
[tool.pyright]
useLibraryCodeForTypes = true
typeCheckingMode = "strict"
pythonVersion = "3.14"
exclude = ["preflight/get_xp_scaling.py", ".venv/", ".ruff_cache/"]