summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/orm/loading.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy/orm/loading.py')
-rw-r--r--lib/sqlalchemy/orm/loading.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/sqlalchemy/orm/loading.py b/lib/sqlalchemy/orm/loading.py
index ae083054c..d9949eb7a 100644
--- a/lib/sqlalchemy/orm/loading.py
+++ b/lib/sqlalchemy/orm/loading.py
@@ -16,7 +16,9 @@ as well as some of the attribute loading strategies.
from __future__ import annotations
from typing import Any
+from typing import Dict
from typing import Iterable
+from typing import List
from typing import Mapping
from typing import Optional
from typing import Sequence
@@ -65,6 +67,9 @@ _O = TypeVar("_O", bound=object)
_new_runid = util.counter()
+_PopulatorDict = Dict[str, List[Tuple[str, Any]]]
+
+
def instances(cursor, context):
"""Return a :class:`.Result` given an ORM query context.
@@ -383,7 +388,7 @@ def get_from_identity(
mapper: Mapper[_O],
key: _IdentityKeyType[_O],
passive: PassiveFlag,
-) -> Union[Optional[_O], LoaderCallableStatus]:
+) -> Union[LoaderCallableStatus, Optional[_O]]:
"""Look up the given key in the given session's identity map,
check the object for expired state if found.