fix: ty warning

This commit is contained in:
2026-08-29 17:41:53 -04:00
parent a7b78832fd
commit 0cc189117d
+3 -1
View File
@@ -270,7 +270,9 @@ class AsyncCrud(Generic[ModelType]):
return cls.default_load_options
@classmethod
def _capture_pk_values(cls: type[Self], instance: ModelType) -> dict[str, Any]:
def _capture_pk_values(
cls: type[Self], instance: DeclarativeBase
) -> dict[str, Any]:
"""Capture PK values off instance — call before commit expires attributes."""
return {
cast(str, col.key): getattr(instance, cast(str, col.key))