Compatibility of "ordinary" and Optional types #9567
Labels
duplicate
This issue or pull request already exists
external library/application issues
a separate library / application that's not SQLAlchemy has a problem (dependent or dependee)
typing
pep -484 typing issues. independent of "mypy"
Ensure stubs packages are not installed
sqlalchemy-stubs
andsqlalchemy2-stubs
are not compatible with v2)Verify if the api is typed
Describe the typing issue
Hi,
in this simple example I try to assign values from a
Mapped[int]
column into aMapped[int | None]
column. MyPy complains that those types are not compatible. I would assume it should behave similar to ordinary dataclasses where this is possible?Thank you!
To Reproduce
Error
Versions
Additional context
No response
The text was updated successfully, but these errors were encountered: