-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathpyproject.toml
executable file
·175 lines (157 loc) · 4.1 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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
[project]
name = "mystbin-py"
version = "7.1.1"
description = "A small simple wrapper around the mystb.in API."
authors = [{ name = "Alex Nørgaard", email = "[email protected]" }]
dependencies = [
"aiohttp<4.0,>=3.8",
"aiohttp[speedups]<4.0,>=3.8; extra == \"speed\"",
]
requires-python = "<4.0,>=3.8"
readme = "README.md"
license = { file = "LICENSE" }
keywords = ["mystbin", "paste"]
classifiers = [
"License :: OSI Approved :: MIT License",
"Intended Audience :: Developers",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Internet",
"Typing :: Typed",
]
[project.urls]
"Issue Tracker" = "https://github.com/PythonistaGuild/mystbin.py/issues"
homepage = "https://github.com/PythonistaGuild/mystbin.py"
repository = "https://github.com/PythonistaGuild/mystbin.py"
[project.scripts]
version = "mystbin.__main__:show_version"
[dependency-groups]
speedups = ["aiohttp[speedups]<4.0,>=3.8"]
docs = ["sphinx", "sphinxcontrib-trio", "furo"]
dev = ["ruff", "typing-extensions"]
[tool.pdm]
distribution = true
[tool.pdm.build]
includes = ["mystbin", "mystbin/**/*.py", "mystbin/py.typed", "LICENSE"]
[tool.pdm.scripts]
docs = "sphinx-build -aEWT --keep-going docs/ docs/build" # TODO: add -n when sphinx is fixed
[build-system]
requires = ["pdm-backend"]
build-backend = "pdm.backend"
[tool.ruff]
line-length = 125
target-version = "py38"
[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",
]
ignore = [
"ANN401",
"EM101", # in this case this is okay
"F401",
"F402",
"F403",
"F405",
"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
]
exclude = ["docs/conf.py"]
[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]
ignore = ["docs/conf.py"]
include = ["mystbin/**/*.py"]
useLibraryCodeForTypes = true
typeCheckingMode = "strict"
pythonVersion = "3.8"