edgedb-python icon indicating copy to clipboard operation
edgedb-python copied to clipboard

Type inherited from reflected type cannot be directly queried

Open dnwpark opened this issue 2 months ago • 0 comments

Using the orm_qb schema, the following code:

from models.orm_qb import default, std

class Inh_A_WithComputed(default.Inh_A):
    n: std.int64

result = self.client.query(Inh_A_WithComputed)

Fails typecheck with:

error: Need type annotation for "result" (hint: "result: list[<type>] = ...")  [var-annotated]
error: Argument 1 to "query" of "ReadOnlyExecutor" has incompatible type "type[Inh_A_WithComputed]"; expected "QueryableObject[Never] | type[QueryableType[Never]]"  [arg-type]

dnwpark avatar Oct 23 '25 18:10 dnwpark