We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm running the latest (at the time of writing) mypy (0.950) and sqlalchemy-stubs (0.4) and hitting this issue:
mypy
sqlalchemy-stubs
from sqlalchemy import Column, Integer from sqlalchemy.ext.declarative import declarative_base Base = declarative_base() class Dog(Base): __tablename__ = 'dogs' age = Column(Integer) class Cat(Base): __tablename__ = 'cats' age = Column(Integer, nullable=False) Animal = Dog | Cat animal: Animal = Cat() animal.age = 20 # Mypy error, should be fine!
The error I get is:
error: Incompatible types in assignment (expression has type "int", variable has type "Union[Column[Optional[int]], Column[int]]")
but I don't think there should be an error.
My mypy config in my pyproject.toml is just:
[tool.mypy] plugins = "sqlmypy"
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I'm running the latest (at the time of writing)
mypy
(0.950) andsqlalchemy-stubs
(0.4) and hitting this issue:The error I get is:
but I don't think there should be an error.
My mypy config in my pyproject.toml is just:
The text was updated successfully, but these errors were encountered: