forked from randovania/randovania
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
92 lines (82 loc) · 2.84 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
[build-system]
requires = [
"setuptools>=58.0.0",
"setuptools_scm>=3.4.3",
"pyqt-distutils>=0.7.3",
"wheel>=0.37.0",
"dulwich",
]
build-backend = "setuptools.build_meta"
[tool.ruff]
line-length = 120
select = [
"E", "F", "W", "C90", "I", "UP", "C4",
"RSE",
"TCH",
"PTH",
"COM818", "COM819",
"ISC",
"PIE",
"PT",
"PLC",
"PLC0208", # iterating over set is also not deterministic, so we shouldn't do that!
"PLE",
"PLR0402", "PLR1701", "PLR1711", "PLR1722", "PLR0206",
"PLR0133", "PLR0124",
"PLW",
]
extend-ignore = [
"PLW0603", # we use some globals here and there
"PLW2901", # TODO: should actually fix these
]
# Version to target for generated code.
target-version = "py311"
[tool.ruff.isort]
# This is very desirable, but causes issues with py-cord and some usages of construct_pack.encode
# required-imports = ["from __future__ import annotations"]
[tool.ruff.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.flake8-type-checking]
runtime-evaluated-base-classes = [
"randovania.bitpacking.bitpacking.BitPackDataclass",
"randovania.bitpacking.type_enforcement.DataclassPostInitTypeCheck",
"randovania.bitpacking.json_dataclass.JsonDataclass",
"randovania.layout.base.base_configuration.BaseConfiguration",
]
[tool.black]
line-length = 120
target-version = ['py311']
[tool.mypy]
files = [
"randovania/bitpacking/",
"randovania/game_description/",
"randovania/games/am2r/gui/dialog/cosmetic_patches_dialog.py",
"randovania/games/blank/",
"randovania/games/cave_story/gui/dialog/cs_cosmetic_patches_dialog.py",
"randovania/games/dread/gui/dialog/dread_cosmetic_patches_dialog.py",
"randovania/games/prime1/gui/dialog/prime_cosmetic_patches_dialog.py",
"randovania/games/prime2/gui/dialog/echoes_cosmetic_patches_dialog.py",
"randovania/games/prime2/exporter/patch_data_factory.py",
"randovania/games/prime3/",
"randovania/games/super_metroid/gui/dialog/super_cosmetic_patches_dialog.py",
"randovania/lib/",
"randovania/gui/dialog/base_cosmetic_patches_dialog.py",
"randovania/gui/preset_settings/trick_level_tab.py",
"test/bitpacking/",
"test/game_description/",
"test/lib/",
"test/games/blank/",
"test/games/cave_story/gui/test_cs_cosmetic_patches_dialog.py",
"test/games/dread/gui/test_dread_cosmetic_patches_dialog.py",
"test/games/prime1/gui/dialog/test_prime_cosmetic_patches_dialog.py",
"test/games/prime2/gui/dialog/test_echoes_cosmetic_patches_dialog.py",
"test/games/prime3/gui/dialog/test_corruption_cosmetic_patches_dialog.py",
]
follow_imports = "silent"
disallow_untyped_defs = true
[[tool.mypy.overrides]]
module = "test.*"
disallow_untyped_defs = false
check_untyped_defs = true