diff options
Diffstat (limited to 'lib/sqlalchemy/ext/mypy/infer.py')
-rw-r--r-- | lib/sqlalchemy/ext/mypy/infer.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/sqlalchemy/ext/mypy/infer.py b/lib/sqlalchemy/ext/mypy/infer.py index 08035d74c..479be40c3 100644 --- a/lib/sqlalchemy/ext/mypy/infer.py +++ b/lib/sqlalchemy/ext/mypy/infer.py @@ -16,6 +16,7 @@ from mypy.nodes import AssignmentStmt from mypy.nodes import CallExpr from mypy.nodes import Expression from mypy.nodes import FuncDef +from mypy.nodes import LambdaExpr from mypy.nodes import MemberExpr from mypy.nodes import NameExpr from mypy.nodes import RefExpr @@ -423,6 +424,10 @@ def _infer_type_from_decl_column( elif isinstance(column_arg, (StrExpr,)): # x = Column("name", String), go to next argument continue + elif isinstance(column_arg, (LambdaExpr,)): + # x = Column("name", String, default=lambda: uuid.uuid4()) + # go to next argument + continue else: assert False |