]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Fix type
authorKazantcev Andrey <45011689+heckad@users.noreply.github.com>
Tue, 20 Jul 2021 10:56:02 +0000 (06:56 -0400)
committerFederico Caselli <cfederico87@gmail.com>
Thu, 22 Jul 2021 20:25:16 +0000 (22:25 +0200)
https://github.com/sqlalchemy/sqlalchemy2-stubs/pull/132#issuecomment-883159494

Closes: #6789
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/6789
Pull-request-sha: 36e9075a8ee0ff699deea8ceef6e72ed4bc1d854

Change-Id: I87fe210b5d69c1e2500fb8e1440592ff44ceaacf

test/ext/mypy/files/other_mapper_props.py

index 993e14458858aa48be3f68e2f9ce9f2ad80304b9..d87165fea27477d94ee9e67231cc146663534e4c 100644 (file)
@@ -42,7 +42,8 @@ class User:
 
 s = Session()
 
-u1: User = s.get(User, 5)
+u1: Optional[User] = s.get(User, 5)
+assert u1
 
 q1: Optional[str] = u1.big_col