Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the edgedb proxy package work a little better for typecheckers #549

Merged
merged 2 commits into from
Nov 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions edgedb/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Auto-generated shim
TYPE_CHECKING = False
if TYPE_CHECKING:
from gel import * # noqa
import gel as _mod
import sys as _sys
_cur = _sys.modules['edgedb']
Expand Down
3 changes: 3 additions & 0 deletions edgedb/_taskgroup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Auto-generated shim
TYPE_CHECKING = False
if TYPE_CHECKING:
from gel._taskgroup import * # noqa
import gel._taskgroup as _mod
import sys as _sys
_cur = _sys.modules['edgedb._taskgroup']
Expand Down
3 changes: 3 additions & 0 deletions edgedb/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Auto-generated shim
TYPE_CHECKING = False
if TYPE_CHECKING:
from gel._version import * # noqa
import gel._version as _mod
import sys as _sys
_cur = _sys.modules['edgedb._version']
Expand Down
3 changes: 3 additions & 0 deletions edgedb/abstract.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Auto-generated shim
TYPE_CHECKING = False
if TYPE_CHECKING:
from gel.abstract import * # noqa
import gel.abstract as _mod
import sys as _sys
_cur = _sys.modules['edgedb.abstract']
Expand Down
3 changes: 3 additions & 0 deletions edgedb/ai/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Auto-generated shim
TYPE_CHECKING = False
if TYPE_CHECKING:
from gel.ai import * # noqa
import gel.ai as _mod
import sys as _sys
_cur = _sys.modules['edgedb.ai']
Expand Down
3 changes: 3 additions & 0 deletions edgedb/ai/core.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Auto-generated shim
TYPE_CHECKING = False
if TYPE_CHECKING:
from gel.ai.core import * # noqa
import gel.ai.core as _mod
import sys as _sys
_cur = _sys.modules['edgedb.ai.core']
Expand Down
3 changes: 3 additions & 0 deletions edgedb/ai/types.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Auto-generated shim
TYPE_CHECKING = False
if TYPE_CHECKING:
from gel.ai.types import * # noqa
import gel.ai.types as _mod
import sys as _sys
_cur = _sys.modules['edgedb.ai.types']
Expand Down
3 changes: 3 additions & 0 deletions edgedb/asyncio_client.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Auto-generated shim
TYPE_CHECKING = False
if TYPE_CHECKING:
from gel.asyncio_client import * # noqa
import gel.asyncio_client as _mod
import sys as _sys
_cur = _sys.modules['edgedb.asyncio_client']
Expand Down
3 changes: 3 additions & 0 deletions edgedb/base_client.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Auto-generated shim
TYPE_CHECKING = False
if TYPE_CHECKING:
from gel.base_client import * # noqa
import gel.base_client as _mod
import sys as _sys
_cur = _sys.modules['edgedb.base_client']
Expand Down
3 changes: 3 additions & 0 deletions edgedb/blocking_client.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Auto-generated shim
TYPE_CHECKING = False
if TYPE_CHECKING:
from gel.blocking_client import * # noqa
import gel.blocking_client as _mod
import sys as _sys
_cur = _sys.modules['edgedb.blocking_client']
Expand Down
3 changes: 3 additions & 0 deletions edgedb/codegen.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Auto-generated shim
TYPE_CHECKING = False
if TYPE_CHECKING:
from gel.codegen import * # noqa
import gel.codegen as _mod
import sys as _sys
_cur = _sys.modules['edgedb.codegen']
Expand Down
3 changes: 3 additions & 0 deletions edgedb/color.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Auto-generated shim
TYPE_CHECKING = False
if TYPE_CHECKING:
from gel.color import * # noqa
import gel.color as _mod
import sys as _sys
_cur = _sys.modules['edgedb.color']
Expand Down
3 changes: 3 additions & 0 deletions edgedb/con_utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Auto-generated shim
TYPE_CHECKING = False
if TYPE_CHECKING:
from gel.con_utils import * # noqa
import gel.con_utils as _mod
import sys as _sys
_cur = _sys.modules['edgedb.con_utils']
Expand Down
3 changes: 3 additions & 0 deletions edgedb/credentials.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Auto-generated shim
TYPE_CHECKING = False
if TYPE_CHECKING:
from gel.credentials import * # noqa
import gel.credentials as _mod
import sys as _sys
_cur = _sys.modules['edgedb.credentials']
Expand Down
3 changes: 3 additions & 0 deletions edgedb/datatypes/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Auto-generated shim
TYPE_CHECKING = False
if TYPE_CHECKING:
from gel.datatypes import * # noqa
import gel.datatypes as _mod
import sys as _sys
_cur = _sys.modules['edgedb.datatypes']
Expand Down
3 changes: 3 additions & 0 deletions edgedb/datatypes/datatypes.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Auto-generated shim
TYPE_CHECKING = False
if TYPE_CHECKING:
from gel.datatypes.datatypes import * # noqa
import gel.datatypes.datatypes as _mod
import sys as _sys
_cur = _sys.modules['edgedb.datatypes.datatypes']
Expand Down
3 changes: 3 additions & 0 deletions edgedb/datatypes/range.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Auto-generated shim
TYPE_CHECKING = False
if TYPE_CHECKING:
from gel.datatypes.range import * # noqa
import gel.datatypes.range as _mod
import sys as _sys
_cur = _sys.modules['edgedb.datatypes.range']
Expand Down
3 changes: 3 additions & 0 deletions edgedb/describe.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Auto-generated shim
TYPE_CHECKING = False
if TYPE_CHECKING:
from gel.describe import * # noqa
import gel.describe as _mod
import sys as _sys
_cur = _sys.modules['edgedb.describe']
Expand Down
3 changes: 3 additions & 0 deletions edgedb/enums.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Auto-generated shim
TYPE_CHECKING = False
if TYPE_CHECKING:
from gel.enums import * # noqa
import gel.enums as _mod
import sys as _sys
_cur = _sys.modules['edgedb.enums']
Expand Down
3 changes: 3 additions & 0 deletions edgedb/errors/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Auto-generated shim
TYPE_CHECKING = False
if TYPE_CHECKING:
from gel.errors import * # noqa
import gel.errors as _mod
import sys as _sys
_cur = _sys.modules['edgedb.errors']
Expand Down
3 changes: 3 additions & 0 deletions edgedb/errors/_base.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Auto-generated shim
TYPE_CHECKING = False
if TYPE_CHECKING:
from gel.errors._base import * # noqa
import gel.errors._base as _mod
import sys as _sys
_cur = _sys.modules['edgedb.errors._base']
Expand Down
3 changes: 3 additions & 0 deletions edgedb/errors/tags.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Auto-generated shim
TYPE_CHECKING = False
if TYPE_CHECKING:
from gel.errors.tags import * # noqa
import gel.errors.tags as _mod
import sys as _sys
_cur = _sys.modules['edgedb.errors.tags']
Expand Down
3 changes: 3 additions & 0 deletions edgedb/introspect.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Auto-generated shim
TYPE_CHECKING = False
if TYPE_CHECKING:
from gel.introspect import * # noqa
import gel.introspect as _mod
import sys as _sys
_cur = _sys.modules['edgedb.introspect']
Expand Down
3 changes: 3 additions & 0 deletions edgedb/options.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Auto-generated shim
TYPE_CHECKING = False
if TYPE_CHECKING:
from gel.options import * # noqa
import gel.options as _mod
import sys as _sys
_cur = _sys.modules['edgedb.options']
Expand Down
3 changes: 3 additions & 0 deletions edgedb/pgproto/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Auto-generated shim
TYPE_CHECKING = False
if TYPE_CHECKING:
from gel.pgproto import * # noqa
import gel.pgproto as _mod
import sys as _sys
_cur = _sys.modules['edgedb.pgproto']
Expand Down
3 changes: 3 additions & 0 deletions edgedb/pgproto/pgproto.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Auto-generated shim
TYPE_CHECKING = False
if TYPE_CHECKING:
from gel.pgproto.pgproto import * # noqa
import gel.pgproto.pgproto as _mod
import sys as _sys
_cur = _sys.modules['edgedb.pgproto.pgproto']
Expand Down
3 changes: 3 additions & 0 deletions edgedb/pgproto/types.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Auto-generated shim
TYPE_CHECKING = False
if TYPE_CHECKING:
from gel.pgproto.types import * # noqa
import gel.pgproto.types as _mod
import sys as _sys
_cur = _sys.modules['edgedb.pgproto.types']
Expand Down
3 changes: 3 additions & 0 deletions edgedb/platform.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Auto-generated shim
TYPE_CHECKING = False
if TYPE_CHECKING:
from gel.platform import * # noqa
import gel.platform as _mod
import sys as _sys
_cur = _sys.modules['edgedb.platform']
Expand Down
3 changes: 3 additions & 0 deletions edgedb/protocol/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Auto-generated shim
TYPE_CHECKING = False
if TYPE_CHECKING:
from gel.protocol import * # noqa
import gel.protocol as _mod
import sys as _sys
_cur = _sys.modules['edgedb.protocol']
Expand Down
3 changes: 3 additions & 0 deletions edgedb/protocol/asyncio_proto.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Auto-generated shim
TYPE_CHECKING = False
if TYPE_CHECKING:
from gel.protocol.asyncio_proto import * # noqa
import gel.protocol.asyncio_proto as _mod
import sys as _sys
_cur = _sys.modules['edgedb.protocol.asyncio_proto']
Expand Down
3 changes: 3 additions & 0 deletions edgedb/protocol/blocking_proto.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Auto-generated shim
TYPE_CHECKING = False
if TYPE_CHECKING:
from gel.protocol.blocking_proto import * # noqa
import gel.protocol.blocking_proto as _mod
import sys as _sys
_cur = _sys.modules['edgedb.protocol.blocking_proto']
Expand Down
3 changes: 3 additions & 0 deletions edgedb/protocol/protocol.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Auto-generated shim
TYPE_CHECKING = False
if TYPE_CHECKING:
from gel.protocol.protocol import * # noqa
import gel.protocol.protocol as _mod
import sys as _sys
_cur = _sys.modules['edgedb.protocol.protocol']
Expand Down
3 changes: 3 additions & 0 deletions edgedb/scram/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Auto-generated shim
TYPE_CHECKING = False
if TYPE_CHECKING:
from gel.scram import * # noqa
import gel.scram as _mod
import sys as _sys
_cur = _sys.modules['edgedb.scram']
Expand Down
3 changes: 3 additions & 0 deletions edgedb/scram/saslprep.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Auto-generated shim
TYPE_CHECKING = False
if TYPE_CHECKING:
from gel.scram.saslprep import * # noqa
import gel.scram.saslprep as _mod
import sys as _sys
_cur = _sys.modules['edgedb.scram.saslprep']
Expand Down
3 changes: 3 additions & 0 deletions edgedb/transaction.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Auto-generated shim
TYPE_CHECKING = False
if TYPE_CHECKING:
from gel.transaction import * # noqa
import gel.transaction as _mod
import sys as _sys
_cur = _sys.modules['edgedb.transaction']
Expand Down
1 change: 1 addition & 0 deletions gel/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
"EnumValue",
"Executor",
"IsolationLevel",
"MultiRange",
"NamedTuple",
"Object",
"Range",
Expand Down
1 change: 1 addition & 0 deletions gel/abstract.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"QueryOptions",
"QueryContext",
"Executor",
"ExecuteContext",
"AsyncIOExecutor",
"ReadOnlyExecutor",
"AsyncIOReadOnlyExecutor",
Expand Down
3 changes: 3 additions & 0 deletions tools/make_import_shims.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ def main():
with open(fname, 'w') as f:
f.write(f'''\
# Auto-generated shim
TYPE_CHECKING = False
if TYPE_CHECKING:
from {mod} import * # noqa
import {mod} as _mod
import sys as _sys
_cur = _sys.modules['{nmod}']
Expand Down
Loading