summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql/compiler.py
diff options
context:
space:
mode:
authormike bayer <mike_mp@zzzcomputing.com>2022-03-12 19:59:29 +0000
committerGerrit Code Review <gerrit@ci3.zzzcomputing.com>2022-03-12 19:59:29 +0000
commit77fc8216a74e6b2d0efc6591c6c735687bd10002 (patch)
treee338f22897ce9bcc994d625ad71aeb4b8ca7b446 /lib/sqlalchemy/sql/compiler.py
parentdf056af49c51dcbcd70eb13ead5c3d8588c08235 (diff)
parent4c28867f944637ef313f98d5f09da05255418c6d (diff)
downloadsqlalchemy-77fc8216a74e6b2d0efc6591c6c735687bd10002.tar.gz
Merge "additional mypy strictness" into main
Diffstat (limited to 'lib/sqlalchemy/sql/compiler.py')
-rw-r--r--lib/sqlalchemy/sql/compiler.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/sqlalchemy/sql/compiler.py b/lib/sqlalchemy/sql/compiler.py
index 09e38a5ab..423c3d446 100644
--- a/lib/sqlalchemy/sql/compiler.py
+++ b/lib/sqlalchemy/sql/compiler.py
@@ -34,6 +34,7 @@ import re
from time import perf_counter
import typing
from typing import Any
+from typing import Callable
from typing import Dict
from typing import List
from typing import Mapping
@@ -629,11 +630,11 @@ class SQLCompiler(Compiled):
"""list of columns that can be post-fetched after INSERT or UPDATE to
receive server-updated values"""
- insert_prefetch: Optional[List[Column[Any]]]
+ insert_prefetch: Sequence[Column[Any]] = ()
"""list of columns for which default values should be evaluated before
an INSERT takes place"""
- update_prefetch: Optional[List[Column[Any]]]
+ update_prefetch: Sequence[Column[Any]] = ()
"""list of columns for which onupdate default values should be evaluated
before an UPDATE takes place"""
@@ -739,8 +740,6 @@ class SQLCompiler(Compiled):
"""if True, there are bindparam() objects that have the isoutparam
flag set."""
- insert_prefetch = update_prefetch = ()
-
postfetch_lastrowid = False
"""if True, and this in insert, use cursor.lastrowid to populate
result.inserted_primary_key. """
@@ -1340,7 +1339,7 @@ class SQLCompiler(Compiled):
)
@util.memoized_property
- def _within_exec_param_key_getter(self):
+ def _within_exec_param_key_getter(self) -> Callable[[Any], str]:
getter = self._key_getters_for_crud_column[2]
if self.escaped_bind_names: