Skip to content

Commit

Permalink
fixing typing for namespaced aio import
Browse files Browse the repository at this point in the history
  • Loading branch information
Micah Denbraver committed Oct 18, 2023
1 parent 94f7aee commit 123e7e2
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 123e7e2

Please sign in to comment.