blob: 20e252cddc2398098e652fe85a4274ed7539b795 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
import typing
from sqlalchemy import create_engine
from sqlalchemy import inspect
e = create_engine("sqlite://")
insp = inspect(e)
cols = insp.get_columns("some_table")
c1 = cols[0]
if typing.TYPE_CHECKING:
# EXPECTED_RE_TYPE: sqlalchemy.engine.base.Engine
reveal_type(e)
# EXPECTED_RE_TYPE: sqlalchemy.engine.reflection.Inspector.*
reveal_type(insp)
# EXPECTED_RE_TYPE: .*list.*TypedDict.*ReflectedColumn.*
reveal_type(cols)
|