Skip to content

Commit a28b817

Browse files
committed
convert typing-only classes and variables to private
1 parent bce9ae8 commit a28b817

File tree

7 files changed

+133
-149
lines changed

7 files changed

+133
-149
lines changed

stubs/grpcio/@tests/stubtest_allowlist.txt

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,3 @@
1-
# Error: is not present at runtime
2-
# =============================
3-
# Classes introduced in the typing library to provide interface structure.
4-
grpc.Behaviour
5-
grpc.CallFuture
6-
grpc.CallIterator
7-
grpc.CertificateChainPair
8-
grpc.Interceptor
9-
grpc.Metadata
10-
grpc.RequestDeserializer
11-
grpc.RequestSerializer
12-
grpc.ResponseDeserializer
13-
grpc.ResponseSerializer
14-
grpc.aio.DoneCallback
15-
grpc.aio.DoneCallbackType
16-
grpc.aio.EOFType
17-
grpc.aio.InterceptedCall
18-
grpc.aio.MetadataKey
19-
grpc.aio.MetadataType
20-
grpc.aio.MetadataValue
21-
grpc.aio.MetadatumType
22-
grpc.aio.RequestSerializer
23-
grpc.aio.ResponseDeserializer
24-
grpc_health.v1.health.SendResponseCallback
25-
grpc_reflection.v1alpha.reflection.AnyServer
26-
grpc_reflection.v1alpha.reflection.AnyServicerContext
27-
281
# Error: is not present at runtime
292
# =============================
303
# Error class attributes that aren't defined.

stubs/grpcio/@tests/test_cases/check_aio.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818
# Metadata
1919
async def metadata() -> None:
2020
metadata = await typing.cast(grpc.aio.Call, None).initial_metadata()
21-
assert_type(metadata["foo"], grpc.aio.MetadataValue)
21+
assert_type(metadata["foo"], grpc.aio._MetadataValue)
2222
for k in metadata:
2323
assert_type(k, str)
2424

2525
for k, v in metadata.items():
2626
assert_type(k, str)
27-
assert_type(v, grpc.aio.MetadataValue)
27+
assert_type(v, grpc.aio._MetadataValue)

stubs/grpcio/@tests/test_cases/check_grpc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,6 @@
4141
assert_type(call_details.timeout, typing.Optional[float])
4242

4343
# Call iterator
44-
call_iter: grpc.CallIterator[str] = typing.cast(typing.Any, None)
44+
call_iter: grpc._CallIterator[str] = typing.cast(typing.Any, None)
4545
for call in call_iter:
4646
assert_type(call, str)

0 commit comments

Comments
 (0)