mypy no longer likes gel_client.get() and .query()
This code:
user = await gel_client.get(default.User, None)
causes these typing errors:
app/api/router.py:48: error: Function does not return a value (it only ever returns None) [func-returns-value]
app/api/router.py:48: error: Argument 1 to "get" of "AsyncIOReadOnlyExecutor" has incompatible type "type[User]"; expected "QueryableObject[None] | type[QueryableType[None]]" [arg-type]
on the latest master (688968c948a7610396669c93cab98ea635081554)
For .query() it turns into:
projects = await gel_client.query(default.Project)
app/api/router.py:72: error: Need type annotation for "projects" (hint: "projects: list[<type>] = ...") [var-annotated]
app/api/router.py:72: error: Argument 1 to "query" of "AsyncIOReadOnlyExecutor" has incompatible type "type[Project]"; expected "QueryableObject[Never] | type[QueryableType[Never]]" [arg-type]
There are tests for this in CI (which are passing), so this must be coming from your venv. Are you installing gel-python in editable mode?
@elprans normal mode via uv:
uv add "gel @ git+https://github.com/geldata/gel-python.git"
I tried fiddling with the venv and the reflections a little bit but it didn't do much.
Can you repro in a new venv?
Can you also try pip install gel==4.0.0b1 (not from GH), but first pip uninstall gel