TypeDAL 5.1.2__tar.gz → 5.1.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {typedal-5.1.2 → typedal-5.1.3}/PKG-INFO +1 -1
- {typedal-5.1.2 → typedal-5.1.3}/pyproject.toml +5 -2
- {typedal-5.1.2 → typedal-5.1.3}/pyproject.toml.orig +3 -2
- {typedal-5.1.2 → typedal-5.1.3}/src/typedal/core.py +12 -8
- {typedal-5.1.2 → typedal-5.1.3}/README.md +0 -0
- {typedal-5.1.2 → typedal-5.1.3}/src/typedal/__about__.py +0 -0
- {typedal-5.1.2 → typedal-5.1.3}/src/typedal/__init__.py +0 -0
- {typedal-5.1.2 → typedal-5.1.3}/src/typedal/asynchronous.py +0 -0
- {typedal-5.1.2 → typedal-5.1.3}/src/typedal/caching.py +0 -0
- {typedal-5.1.2 → typedal-5.1.3}/src/typedal/cli.py +0 -0
- {typedal-5.1.2 → typedal-5.1.3}/src/typedal/config.py +0 -0
- {typedal-5.1.2 → typedal-5.1.3}/src/typedal/constants.py +0 -0
- {typedal-5.1.2 → typedal-5.1.3}/src/typedal/define.py +0 -0
- {typedal-5.1.2 → typedal-5.1.3}/src/typedal/enum_helpers.py +0 -0
- {typedal-5.1.2 → typedal-5.1.3}/src/typedal/fields.py +0 -0
- {typedal-5.1.2 → typedal-5.1.3}/src/typedal/for_py4web.py +0 -0
- {typedal-5.1.2 → typedal-5.1.3}/src/typedal/for_web2py.py +0 -0
- {typedal-5.1.2 → typedal-5.1.3}/src/typedal/helpers.py +0 -0
- {typedal-5.1.2 → typedal-5.1.3}/src/typedal/mixins.py +0 -0
- {typedal-5.1.2 → typedal-5.1.3}/src/typedal/py.typed +0 -0
- {typedal-5.1.2 → typedal-5.1.3}/src/typedal/query_builder.py +0 -0
- {typedal-5.1.2 → typedal-5.1.3}/src/typedal/relationships.py +0 -0
- {typedal-5.1.2 → typedal-5.1.3}/src/typedal/rows.py +0 -0
- {typedal-5.1.2 → typedal-5.1.3}/src/typedal/serializers/as_json.py +0 -0
- {typedal-5.1.2 → typedal-5.1.3}/src/typedal/serializers/typescript.py +0 -0
- {typedal-5.1.2 → typedal-5.1.3}/src/typedal/tables.py +0 -0
- {typedal-5.1.2 → typedal-5.1.3}/src/typedal/types.py +0 -0
- {typedal-5.1.2 → typedal-5.1.3}/src/typedal/warnings.py +0 -0
- {typedal-5.1.2 → typedal-5.1.3}/src/typedal/web2py_py4web_shared.py +0 -0
|
@@ -6,7 +6,7 @@ build-backend = "uv_build"
|
|
|
6
6
|
name = "TypeDAL"
|
|
7
7
|
description = "Typing support for PyDAL"
|
|
8
8
|
readme = "README.md"
|
|
9
|
-
version = "5.1.
|
|
9
|
+
version = "5.1.3"
|
|
10
10
|
requires-python = ">=3.12"
|
|
11
11
|
license-expression = "MIT"
|
|
12
12
|
keywords = []
|
|
@@ -226,7 +226,10 @@ extend-ignore = [
|
|
|
226
226
|
"D212",
|
|
227
227
|
"D418",
|
|
228
228
|
]
|
|
229
|
-
ignore = [
|
|
229
|
+
ignore = [
|
|
230
|
+
"RUF012",
|
|
231
|
+
"RUF013",
|
|
232
|
+
]
|
|
230
233
|
|
|
231
234
|
[tool.ruff.lint.pydocstyle]
|
|
232
235
|
convention = "google"
|
|
@@ -6,7 +6,7 @@ build-backend = "uv_build"
|
|
|
6
6
|
name = "TypeDAL"
|
|
7
7
|
description = 'Typing support for PyDAL'
|
|
8
8
|
readme = "README.md"
|
|
9
|
-
version = "5.1.
|
|
9
|
+
version = "5.1.3"
|
|
10
10
|
requires-python = ">=3.12"
|
|
11
11
|
license-expression = "MIT"
|
|
12
12
|
keywords = []
|
|
@@ -270,7 +270,8 @@ extend-ignore = [
|
|
|
270
270
|
]
|
|
271
271
|
|
|
272
272
|
ignore = [
|
|
273
|
-
"
|
|
273
|
+
"RUF012", # mutable class attributes
|
|
274
|
+
"RUF013", # implicit optional
|
|
274
275
|
]
|
|
275
276
|
|
|
276
277
|
|
|
@@ -202,15 +202,17 @@ def resolve_annotation(ftype: str, namespace: t.Mapping[str, type] | None = None
|
|
|
202
202
|
|
|
203
203
|
if t.TYPE_CHECKING:
|
|
204
204
|
|
|
205
|
-
class _TypeDALBase:
|
|
205
|
+
class _TypeDALBase(pydal.DAL):
|
|
206
206
|
# attributes accessed throughout the codebase
|
|
207
207
|
_adapter: t.Any
|
|
208
208
|
_migrate: t.Any
|
|
209
209
|
representers: t.Any
|
|
210
210
|
|
|
211
|
+
def __new__(cls, *args: t.Any, **kwargs: t.Any) -> t.Self: ...
|
|
212
|
+
|
|
211
213
|
def __init__(self, *args: t.Any, **kwargs: t.Any) -> None: ...
|
|
212
214
|
|
|
213
|
-
def __call__(self, query: t.Any = None) -> "Set": ...
|
|
215
|
+
def __call__(self, query: t.Any = None, ignore_common_filters: t.Any = None) -> "Set": ...
|
|
214
216
|
|
|
215
217
|
def commit(self) -> None: ...
|
|
216
218
|
|
|
@@ -218,13 +220,15 @@ if t.TYPE_CHECKING:
|
|
|
218
220
|
|
|
219
221
|
def define_table(self, *args: t.Any, **kwargs: t.Any) -> "Table": ...
|
|
220
222
|
|
|
221
|
-
|
|
223
|
+
# pydal ships no py.typed, so without this declaration the result would be Any for mypy users.
|
|
224
|
+
# pyright infers `TypeIs[...]` from pydal's `return callable(...)`, which `bool` can't restate.
|
|
225
|
+
def has_representer(self, name: str) -> bool: ... # pyright: ignore[reportIncompatibleMethodOverride]
|
|
222
226
|
|
|
223
227
|
def represent(self, name: str, *args: t.Any, **kwargs: t.Any) -> str: ...
|
|
224
228
|
|
|
225
229
|
# pydal exposes dynamic table attributes like `db.my_table`.
|
|
226
230
|
# this keeps type checkers from flagging these as missing attributes.
|
|
227
|
-
def __getattr__(self,
|
|
231
|
+
def __getattr__(self, key: str) -> "Table": ...
|
|
228
232
|
|
|
229
233
|
else:
|
|
230
234
|
|
|
@@ -251,7 +255,7 @@ class TypeDAL(_TypeDALBase):
|
|
|
251
255
|
_async_workers: ConnectionWorkerPool
|
|
252
256
|
|
|
253
257
|
# pydal runs these around every statement; drop BlockingAccessHandler to disable the guard.
|
|
254
|
-
execution_handlers:
|
|
258
|
+
execution_handlers: list[type[ExecutionHandler]] = [
|
|
255
259
|
*pydal.DAL.execution_handlers,
|
|
256
260
|
BlockingAccessHandler,
|
|
257
261
|
]
|
|
@@ -419,7 +423,7 @@ class TypeDAL(_TypeDALBase):
|
|
|
419
423
|
self._async_workers.shutdown()
|
|
420
424
|
adapter = self._adapter
|
|
421
425
|
try:
|
|
422
|
-
super().close()
|
|
426
|
+
super().close()
|
|
423
427
|
finally:
|
|
424
428
|
for model in set(self._builder.class_map.values()):
|
|
425
429
|
model.unbind()
|
|
@@ -584,7 +588,7 @@ class TypeDAL(_TypeDALBase):
|
|
|
584
588
|
Example:
|
|
585
589
|
db['users'] -> user
|
|
586
590
|
"""
|
|
587
|
-
return t.cast(Table, super().__getitem__(str(key)))
|
|
591
|
+
return t.cast(Table, super().__getitem__(str(key)))
|
|
588
592
|
|
|
589
593
|
def find_model(self, table_name: str) -> t.Type["TypedTable"] | None:
|
|
590
594
|
"""
|
|
@@ -664,7 +668,7 @@ class TypeDAL(_TypeDALBase):
|
|
|
664
668
|
if SYSTEM_SUPPORTS_TEMPLATES and isinstance(query, Template): # pragma: no cover
|
|
665
669
|
query = sql_escape_template(self, query)
|
|
666
670
|
|
|
667
|
-
rows: list[t.Any] = super().executesql(
|
|
671
|
+
rows: list[t.Any] = super().executesql(
|
|
668
672
|
query,
|
|
669
673
|
placeholders=placeholders,
|
|
670
674
|
as_dict=as_dict,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|