4 ms·
One example: ``` class Base(DeclarativeBase): pass class Foo(Base): name: Mapped[str] x = Foo() ``` does not get caught as a type error statically, I
by kietay 2y ago
One example:
```
class Base(DeclarativeBase):
pass
class Foo(Base):
name: Mapped[str]
x = Foo()
```
does not get caught as a type error statically, I'm assuming because all records are treated as mutable.
However, `x = Foo(name=2)` also doesn't get caught by pyright, which seems wrong. I could be misusing somehow though.
- kolanos 2y agoI don't think SQLAlchemy officially supports pyright,, although it would be great if they did given all the headaches people have had with mypy.