-
-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathpyproject.toml
More file actions
executable file
·270 lines (234 loc) · 5.22 KB
/
pyproject.toml
File metadata and controls
executable file
·270 lines (234 loc) · 5.22 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
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
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
[tool.poetry]
name = "strawberry-sqlalchemy-mapper"
packages = [{ include = "strawberry_sqlalchemy_mapper", from = "src" }]
version = "0.8.0"
description = "A library for autogenerating Strawberry GraphQL types from SQLAlchemy models."
authors = ["Tim Dumol <tim@timdumol.com>"]
license = "MIT"
readme = "README.md"
keywords = ["graphql", "sqlalchemy", "strawberry"]
homepage = "https://strawberry.rocks/"
repository = "https://github.com/strawberry-graphql/strawberry-sqlalchemy"
documentation = "https://strawberry.rocks/"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Python Modules",
"License :: OSI Approved :: MIT License",
]
include = ["src/strawberry_sqlalchemy_mapper/py.typed"]
[tool.poetry.urls]
"Changelog" = "https://strawberry.rocks/changelog"
"Discord" = "https://discord.com/invite/3uQ2PaY"
"Twitter" = "https://twitter.com/strawberry_gql"
"Mastodon" = "https://farbun.social/@strawberry"
"Sponsor on GitHub" = "https://github.com/sponsors/strawberry-graphql"
"Sponsor on Open Collective" = "https://opencollective.com/strawberry-graphql"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.setuptools_scm]
# For smarter version schemes and other configuration options,
# check out https://github.com/pypa/setuptools_scm
version_scheme = "no-guess-dev"
[tool.poetry.dependencies]
python = "^3.8"
sqlalchemy = { extras = ["asyncio"], version = ">=1.4" }
strawberry-graphql = ">=0.236.0"
sentinel = ">=0.3,<1.1"
greenlet = { version = ">=3.0.0rc1", python = ">=3.12" }
sqlakeyset = "^2.0.1695177552"
[tool.poetry.group.dev.dependencies]
asyncpg = [
{ version = ">=0.28,<0.30", python = "<3.13" },
{ version = ">=0.30", python = ">=3.13" },
]
importlib-metadata = ">=4.11.1,<8.0.0"
mypy = "1.8.0"
nox = "^2023.4.22"
nox-poetry = "^1.0.2"
packaging = ">=23.1"
pg8000 = ">=1.30.1"
psycopg2 = ">=2.9.10"
pytest = "^7.2"
pytest-asyncio = ">=0.20.3,<0.24.0"
pytest-codspeed = "^2.0.1"
pytest-cov = "^4.0.0"
pytest-emoji = "^0.2.0"
pytest-mypy-plugins = ">=1.10,<4.0"
pytest-xdist = { extras = ["psutil"], version = "^3.1.0" }
setuptools = ">=67.8.0"
"testing.postgresql" = ">=1.3.0"
ruff = "^0.4.4"
[tool.pytest.ini_options]
addopts = "--emoji --mypy-ini-file=mypy.ini"
testpaths = ["tests/"]
asyncio_mode = "auto"
[tool.autopub]
git-username = "Botberry"
git-email = "bot@strawberry.rocks"
project-name = "🍓"
append-github-contributor = true
[tool.pyright]
include = ["src/strawberry_sqlalchemy_mapper"]
exclude = ["**/__pycache__"]
reportMissingImports = true
reportMissingTypeStubs = false
pythonVersion = "3.8"
stubPath = ""
[tool.ruff]
line-length = 100
indent-width = 4
lint.select = ["ALL"]
target-version = "py38"
lint.ignore = [
# https://github.com/astral-sh/ruff/pull/4427
# equivalent to keep-runtime-typing
"UP006",
"UP007",
"TID252",
# we use asserts in tests and to hint mypy
"S101",
"S102",
"S104",
"S324",
# maybe we can enable this in future
# we'd want to have consistent docstrings in future
"D",
"ANN001", # missing annotation for function argument self.
"ANN101",
"ANN102",
"ANN002", # missing annotation for *args.
"ANN003", # missing annotation for **kwargs.
"ANN202",
"ANN204",
"ANN205",
"ANN401",
"PGH003",
"PGH004",
"RET504",
"RET505",
"RET506",
"RET507",
"RET503",
"BLE001",
"B008",
"N811",
"N804",
"N818",
# Variable `T` in function should be lowercase
# this seems a potential bug or opportunity for improvement in ruff
"N806",
# first argument should named self (found in tests)
"N805",
"N815",
# shadowing builtins
"A001",
"A002",
"A003",
"ARG001",
"ARG002",
"ARG003",
"ARG004",
"ARG005",
"FBT001",
"FBT002",
"FBT003",
"PT001",
"PT023",
# enable these, we have some in tests
"B006",
"PT007",
"PT011",
"PT012",
"PT015",
"PT017",
"C414",
"N802",
"SIM117",
"SIM102",
"F841",
"B027",
"B905",
"ISC001",
# same?
"S105",
"S106",
"DTZ003",
"DTZ005",
"RSE102",
"SLF001",
# in tests
"DTZ001",
"EM101",
"EM102",
"EM103",
"B904",
"B019",
"N801",
"N807",
# pandas
"PD",
"RUF012",
"PLC0105",
"FA102",
# code complexity
"C",
"C901",
# trailing commas
"COM812",
"PLR",
"INP",
"TRY",
"SIM300",
"SIM114",
"DJ008",
"TD002",
"TD003",
"FIX001",
"FIX002",
"FA100",
]
fix = true
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".hg",
".mypy_cache",
".nox",
".pants.d",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
]
src = ["src/strawberry_sqlalchemy_mapper", "tests"]
[tool.ruff.lint.per-file-ignores]
"docs/conf.py" = ["ERA001", "PTH118", "PTH120"]
"src/strawberry_sqlalchemy_mapper/field.py" = ["TCH001", "TCH002", "TCH003"]
"src/strawberry_sqlalchemy_mapper/__init__.py" = ["UP036"]
"tests/*" = [
"RSE102",
"SLF001",
"ANN001",
"ANN201",
"PLW0603",
"PLC1901",
"S603",
"S607",
"B018",
]
[tool.ruff.lint.isort]
known-first-party = ["strawberry-sqlalchemy-mapper"]
known-third-party = ["strawberry"]
extra-standard-library = ["typing_extensions"]