Skip to content

Commit

Permalink
Merge pull request #52 from macro1/aio-import
Browse files Browse the repository at this point in the history
Fixing typing for namespaced aio import
  • Loading branch information
shabbyrobe authored Dec 28, 2023
2 parents 6d38b08 + 123e7e2 commit 32ba796
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions grpc-stubs/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import typing
from concurrent import futures
from types import ModuleType, TracebackType

from grpc import aio

__version__: str

# This class encodes an uninhabited type, requiring use of explicit casts or ignores
Expand Down
7 changes: 7 additions & 0 deletions typesafety/test_grpc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@
reveal_type(Channel()) # N: Revealed type is "grpc.aio.Channel"
reveal_type(Server()) # N: Revealed type is "grpc.aio.Server"
- case: grpc_aio_package
main: |
import grpc
reveal_type(grpc.aio.Channel()) # N: Revealed type is "grpc.aio.Channel"
reveal_type(grpc.aio.Server()) # N: Revealed type is "grpc.aio.Server"
- case: grpc_status
main: |
from grpc import Status
Expand Down

0 comments on commit 32ba796

Please sign in to comment.