-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpyproject.toml
147 lines (124 loc) · 3.94 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
[project]
name = "supermechs-bot"
version = "0.1.0"
description = "SuperMechs themed discord bot. Features item lookup, comparison, mech building, & more."
authors = [
{name = "Eneg", email = "[email protected]"},
]
dependencies = [
"aiohttp == 3.9.5",
"anyio == 4.*",
"attrs >= 23.2.0",
"cattrs >= 24.1.2",
"datargs >= 1.1.0",
"disnake >= 2.10.1",
"disnake-ext-plugins == 0.3.*",
"orjson >= 3.8.10",
"pillow == 10.*",
"psutil >= 5.9.7",
"python-dotenv >= 1.0.0",
"rtoml >= 0.9.0",
"typing-extensions >= 4.9.0",
"discord-ui-store @ git+https://github.com/Enegg/[email protected]",
"monads @ git+https://github.com/Enegg/[email protected]",
"supermechs @ git+https://github.com/Enegg/supermechs@rewrite",
]
requires-python = ">= 3.11, < 3.12"
readme = "README.md"
license = {text = "GPL-3.0-or-later"}
[build-system]
requires = ["pdm-backend"]
build-backend = "pdm.backend"
[tool.pdm]
distribution = false
[tool.pdm.dev-dependencies]
dev = [ "-e app @ file:///${PROJECT_ROOT}" ]
lint = [ "ruff >= 0.8.2" ]
[tool.pdm.build]
includes = ["src/app"]
[tool.ruff]
src = ["src"]
line-length = 100
target-version = "py311"
[tool.ruff.lint]
select = [
"ALL",
]
ignore = [
"FIX", "TD", # todo, fixme
"ANN401", # use of Any
"ARG", # unused parameters
"B005", # I know str.strip(...) takes a set
"B008", # calls in param defaults
"BLE001", # catching Exception; reported in places where exceptions are gathered into a group
"C901", # complex functions oh no
"COM812", # don't require commas
"D1", # don't enforce docstrings for public API
"FBT", # positional bool params; using inlayHints
"INP001", # no __init__.py
"N806", # LET ME USE CONSTANTS IN FUNCTIONS
"N818", # naming exceptions as *Error
"PD", # not using pandas
"PLR091", # too many ...
"PLW0603", # lifetime globals are ok
"PIE796", # non-unique enums (that's a job for @unique)
"PYI041", # int | float isn't redundant
"PLC0105", # T_co / T_contra; don't care
"PLC0414", # import foo as foo
"RET503", # "return xyz(...)" where "xyz(...) -> None" is ok
"S101", # asserts are very useful
"S311", # we don't do cryptography
"SLF001", # _member access; handled by pyright
"T201", # print
"TC002", # move under TYPE_CHECKING
]
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.ruff.lint.pycodestyle]
max-line-length = 105
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F403"] # import *
[tool.ruff.lint.isort]
combine-as-imports = true
split-on-trailing-comma = false
extra-standard-library = ["typing_extensions"]
forced-separate = ["supermechs"]
section-order = [
"future",
"standard-library",
"third-party",
"discord",
"first-party",
"local-folder",
]
[tool.ruff.lint.isort.sections]
discord = ["disnake", "discord", "ui_store", "disnake_plugins", "app.disnake_types"]
[tool.ruff.lint.flake8-type-checking]
exempt-modules = ["typing", "typing_extensions"]
[tool.ruff.lint.flake8-builtins]
builtins-ignorelist = ["id", "format", "input"]
[tool.ruff.lint.pylint]
max-args = 8
allow-dunder-method-names = [
"__attrs_pre_init__ ",
"__attrs_post_init__",
"__attrs_init__",
]
[tool.pyright]
typeCheckingMode = "strict"
pythonVersion = "3.11"
# disabled even in strict
deprecateTypingAliases = true
reportImplicitOverride = "warning"
reportImportCycles = true
reportUninitializedInstanceVariable = true
reportUnnecessaryTypeIgnoreComment = "warning"
# prefer "# pyright: ignore[ruleName]" over "# type: ignore"
enableTypeIgnoreComments = false
# downgrade a few common non-issues
reportUnusedImport = "warning"
reportMatchNotExhaustive = "warning"
reportUnnecessaryCast = "warning"
reportUnnecessaryIsInstance = "information"
reportUnknownMemberType = false # disnake causes plenty errors
reportMissingTypeStubs = false