()
| 48 | |
| 49 | |
| 50 | def get_poly_messages() -> Sequence[Message]: |
| 51 | with Session(engine) as session: |
| 52 | PolymorphicMessage = with_polymorphic(Message, (UserComment,)) |
| 53 | |
| 54 | if TYPE_CHECKING: |
| 55 | assert_type(PolymorphicMessage, AliasedClass[Message]) |
| 56 | |
| 57 | poly_query = select(PolymorphicMessage) |
| 58 | |
| 59 | if TYPE_CHECKING: |
| 60 | assert_type(poly_query, Select[Message]) |
| 61 | |
| 62 | return session.scalars(poly_query).all() |
nothing calls this directly
no test coverage detected