This commit is contained in:
2025-05-22 20:25:38 +02:00
parent 09f6750c2b
commit ce03fbf12f
529 changed files with 3353 additions and 3312 deletions

View File

@@ -107,6 +107,7 @@ if typing.TYPE_CHECKING:
_StrategyKey = Tuple[Any, ...]
_T = TypeVar("_T", bound=Any)
_T_co = TypeVar("_T_co", bound=Any, covariant=True)
_TLS = TypeVar("_TLS", bound="Type[LoaderStrategy]")
@@ -653,7 +654,7 @@ class MapperProperty(
@inspection._self_inspects
class PropComparator(SQLORMOperations[_T], Generic[_T], ColumnOperators):
class PropComparator(SQLORMOperations[_T_co], Generic[_T_co], ColumnOperators):
r"""Defines SQL operations for ORM mapped attributes.
SQLAlchemy allows for operators to
@@ -740,7 +741,7 @@ class PropComparator(SQLORMOperations[_T], Generic[_T], ColumnOperators):
_parententity: _InternalEntityType[Any]
_adapt_to_entity: Optional[AliasedInsp[Any]]
prop: RODescriptorReference[MapperProperty[_T]]
prop: RODescriptorReference[MapperProperty[_T_co]]
def __init__(
self,
@@ -922,9 +923,7 @@ class PropComparator(SQLORMOperations[_T], Generic[_T], ColumnOperators):
"""
return self.operate( # type: ignore
PropComparator.any_op, criterion, **kwargs
)
return self.operate(PropComparator.any_op, criterion, **kwargs)
def has(
self,
@@ -946,9 +945,7 @@ class PropComparator(SQLORMOperations[_T], Generic[_T], ColumnOperators):
"""
return self.operate( # type: ignore
PropComparator.has_op, criterion, **kwargs
)
return self.operate(PropComparator.has_op, criterion, **kwargs)
class StrategizedProperty(MapperProperty[_T]):