summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql/selectable.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy/sql/selectable.py')
-rw-r--r--lib/sqlalchemy/sql/selectable.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/sqlalchemy/sql/selectable.py b/lib/sqlalchemy/sql/selectable.py
index 8a371951e..19d464180 100644
--- a/lib/sqlalchemy/sql/selectable.py
+++ b/lib/sqlalchemy/sql/selectable.py
@@ -3067,6 +3067,9 @@ class TableClause(roles.DMLTableRole, Immutable, NamedFromClause):
return [self]
+ForUpdateParameter = Union["ForUpdateArg", None, bool, Dict[str, Any]]
+
+
class ForUpdateArg(ClauseElement):
_traverse_internals: _TraverseInternalsType = [
("of", InternalTraversal.dp_clauseelement_list),
@@ -3082,7 +3085,7 @@ class ForUpdateArg(ClauseElement):
@classmethod
def _from_argument(
- cls, with_for_update: Union[ForUpdateArg, None, bool, Dict[str, Any]]
+ cls, with_for_update: ForUpdateParameter
) -> Optional[ForUpdateArg]:
if isinstance(with_for_update, ForUpdateArg):
return with_for_update