summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql/selectable.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2022-04-07 12:37:23 -0400
committermike bayer <mike_mp@zzzcomputing.com>2022-04-12 02:09:50 +0000
commitaa9cd878e8249a4a758c7f968e929e92fede42a5 (patch)
tree1be1c9dc24dd247a150be55d65bfc56ebaf111bc /lib/sqlalchemy/sql/selectable.py
parent98eae4e181cb2d1bbc67ec834bfad29dcba7f461 (diff)
downloadsqlalchemy-aa9cd878e8249a4a758c7f968e929e92fede42a5.tar.gz
pep-484: session, instancestate, etc
Also adds some fixes to annotation-based mapping that have come up, as well as starts to add more pep-484 test cases Change-Id: Ia722bbbc7967a11b23b66c8084eb61df9d233fee
Diffstat (limited to 'lib/sqlalchemy/sql/selectable.py')
-rw-r--r--lib/sqlalchemy/sql/selectable.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/sqlalchemy/sql/selectable.py b/lib/sqlalchemy/sql/selectable.py
index d7cc32733..99a6baa89 100644
--- a/lib/sqlalchemy/sql/selectable.py
+++ b/lib/sqlalchemy/sql/selectable.py
@@ -3037,7 +3037,9 @@ class ForUpdateArg(ClauseElement):
skip_locked: bool
@classmethod
- def _from_argument(cls, with_for_update):
+ def _from_argument(
+ cls, with_for_update: Union[ForUpdateArg, None, bool, Dict[str, Any]]
+ ) -> Optional[ForUpdateArg]:
if isinstance(with_for_update, ForUpdateArg):
return with_for_update
elif with_for_update in (None, False):
@@ -3045,7 +3047,7 @@ class ForUpdateArg(ClauseElement):
elif with_for_update is True:
return ForUpdateArg()
else:
- return ForUpdateArg(**with_for_update)
+ return ForUpdateArg(**cast("Dict[str, Any]", with_for_update))
def __eq__(self, other):
return (