diff options
Diffstat (limited to 'lib/sqlalchemy/orm/base.py')
-rw-r--r-- | lib/sqlalchemy/orm/base.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/sqlalchemy/orm/base.py b/lib/sqlalchemy/orm/base.py index 10902e970..93e2d609a 100644 --- a/lib/sqlalchemy/orm/base.py +++ b/lib/sqlalchemy/orm/base.py @@ -11,6 +11,9 @@ import operator import typing +from typing import Any +from typing import Generic +from typing import TypeVar from . import exc from .. import exc as sa_exc @@ -19,6 +22,8 @@ from .. import util from ..util import typing as compat_typing +_T = TypeVar("_T", bound=Any) + PASSIVE_NO_RESULT = util.symbol( "PASSIVE_NO_RESULT", """Symbol returned by a loader callable or other attribute/history @@ -574,7 +579,7 @@ class InspectionAttrInfo(InspectionAttr): return {} -class _MappedAttribute: +class _MappedAttribute(Generic[_T]): """Mixin for attributes which should be replaced by mapper-assigned attributes. |