Description
I have a model using PostgreSQL's UUID:
from sqlalchemy.dialects import postgresql
class MyModel(Base):
__tablename__ = 'my-model'
some_id = Column(postgresql.UUID(as_uuid=True), nullable=False)
SQLAlchemy lets me create instances as follows:
import uuid
a_uuid = uuid.uuid4()
MyModel(some_id=a_uuid)
MyModel(some_id=str(a_uuid))
However, the stubs here seem to only accept the latter, not the former:
error: Incompatible type for "some_id" of "MyModel" (got "UUID", expected "str")
Could support for the former be added?
(I tested with sqlalchemy-stubs master)
Metadata
Metadata
Assignees
Labels
No labels