summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/ext/mypy/decl_class.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2023-01-16 20:01:15 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2023-01-16 20:01:15 -0500
commitb59304b99037431913781a3506998533618598ef (patch)
tree50295fb7b0ac60e0e8c3aba1eb99ac478a5f3bba /lib/sqlalchemy/ext/mypy/decl_class.py
parent1762c40490182fc511b71f5044f7252e2937162b (diff)
downloadsqlalchemy-fix_mypy.tar.gz
fixes for mypy, error in stubsfix_mypy
There's a critical mistake in the stubs that we may want to fix. Or we might just keep it that way as this is all obsolete anyway. not sure yet. Change-Id: I380a1dc177de571b94a176e0f5e5b5d8d4ea2453
Diffstat (limited to 'lib/sqlalchemy/ext/mypy/decl_class.py')
-rw-r--r--lib/sqlalchemy/ext/mypy/decl_class.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/sqlalchemy/ext/mypy/decl_class.py b/lib/sqlalchemy/ext/mypy/decl_class.py
index c33c30e25..3c9847b73 100644
--- a/lib/sqlalchemy/ext/mypy/decl_class.py
+++ b/lib/sqlalchemy/ext/mypy/decl_class.py
@@ -398,7 +398,9 @@ def _scan_declarative_assignment_stmt(
else:
for item in stmt.rvalue.items:
if isinstance(item, (NameExpr, StrExpr)):
- apply.apply_mypy_mapped_attr(cls, api, item, attributes)
+ apply.apply_mypy_mapped_attr(
+ cls, api, item, attributes, reset_statement_type=True
+ )
left_hand_mapped_type: Optional[Type] = None
left_hand_explicit_type: Optional[ProperType] = None