-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathpyproject.toml
155 lines (142 loc) · 3.43 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
[tool.poetry]
name = "pythonista-bot"
version = "0.1.0"
description = "The bot that runs the Pythonista guild!"
authors = [
"Alex Nørgaard <[email protected]>",
"IAmTomahawkx <[email protected]>",
"EvieePy <[email protected]>",
]
license = "MPL2.0"
readme = "README.md"
package-mode = false
[tool.poetry.dependencies]
python = "^3.11"
"discord.py" = { git = "https://github.com/Rapptz/discord.py.git", extras = [
"speed",
] }
aiohttp = "*"
asyncpg = "*"
toml = "*"
"mystbin.py" = "*"
jishaku = "*"
uvicorn = "*"
starlette-plus = { git = "https://github.com/PythonistaGuild/StarlettePlus" }
[tool.poetry.group.dev.dependencies]
ruff = "*"
"asyncpg-stubs" = "*"
"typing-extensions" = "*"
[tool.ruff]
line-length = 125
target-version = "py311"
[tool.ruff.lint]
preview = true
select = [
"A",
"ANN",
"ASYNC",
"B",
"BLE",
"C4",
"COM",
"DTZ",
"E",
"EM",
"ERA",
"F",
"FA",
"FBT",
"FURB",
"G",
"I",
"INP",
"ISC",
"NPY",
"PD",
"PERF",
"PGH",
"PIE",
"PLC",
"PLE",
"PLW",
"PTH",
"PYI",
"Q",
"Q003",
"RET",
"RSE",
"RUF",
"S",
"SIM",
"SLOT",
"T20",
"TC",
"TID",
"TRY",
"UP",
"YTT",
# "DOC", # not in a bot, please
]
ignore = [
"ANN401",
"ASYNC109", # dpy commonly uses this parameter
"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
"Q000",
"RUF001",
"RUF009",
"S101", # assert is used for type checking in this codebase
"SIM105",
"TRY003", # over-eager rule
"TRY301", # unrealistic rule
"UP034",
"UP038",
]
unfixable = [
"E501", # line length handled in other ways by ruff format
"ERA", # Don't delete commented out code
]
[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"
[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.11"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"