Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
853cb17
Import raw stubs from grpc-stubs package
shabbyrobe Dec 27, 2023
b3dd7ca
Format grpc stubs
shabbyrobe Dec 27, 2023
775a418
Fix ruff lints
shabbyrobe Dec 27, 2023
241b0e1
Migrate tests from grpc-stubs
shabbyrobe Dec 27, 2023
5eadd4f
Convert docstrings to comments
shabbyrobe Dec 27, 2023
1c09ab4
Default argument warnings, missing generics
shabbyrobe Dec 27, 2023
505d234
Add TypeAlias
shabbyrobe Dec 27, 2023
7a7cf61
Update typing.Callable to collections.abc.Callable
shabbyrobe Dec 27, 2023
0a228f8
Update more typings to collections.abcs
shabbyrobe Dec 27, 2023
1e31e62
Add underscore to typevars
shabbyrobe Dec 27, 2023
18b3d7d
Silence remaining typing failures
shabbyrobe Dec 27, 2023
15811e6
Paper over cracks in supplemental packages
shabbyrobe Dec 27, 2023
59fb630
Add ABC and ABCMeta to classes that declare it in the grpcio source
shabbyrobe Dec 27, 2023
0ac8415
Add check for alternate aio import
shabbyrobe Dec 28, 2023
82d02fb
Move grpc stubs into grpcio folder
shabbyrobe Dec 28, 2023
9993e8d
Add abstractmethod decorator to grpc.Call
shabbyrobe Dec 28, 2023
be40720
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Dec 28, 2023
5b3e698
Fix a bunch of stubtest issues
shabbyrobe Dec 28, 2023
05e2e99
Merge branch 'main' into grpc-stubs
srittau Apr 14, 2024
811304e
Merge branch 'main' into grpc-stubs
JelleZijlstra Oct 2, 2024
8f9ae2a
Merge branch 'main' into grpc-stubs
Avasam Feb 14, 2025
177bd44
Remove unnecessary assertion
shabbyrobe Feb 22, 2025
4678c7c
Remove unnecessary assertion
shabbyrobe Feb 22, 2025
a75a853
Lint fixes
Avasam Feb 22, 2025
1290473
Merge pull request #1 from Avasam/grpc-stubs-lint-fixes
shabbyrobe Feb 24, 2025
bce9ae8
resolve subtest issues
macro1 Mar 28, 2025
a28b817
convert typing-only classes and variables to private
macro1 Mar 31, 2025
5242f27
remove tests on abstract class
macro1 Apr 1, 2025
93032c5
Merge pull request #2 from macro1/grpc-stubs
shabbyrobe Apr 1, 2025
089280a
import typing symbols directly rather than accessing the typing module
Avasam Apr 2, 2025
c513452
Update stubs/grpcio/@tests/test_cases/check_aio_multi_callable.py
Avasam Apr 4, 2025
6a87f03
Merge pull request #3 from Avasam/import-typing-symbols-directly-rath…
shabbyrobe Apr 4, 2025
725f55b
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 4, 2025
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
Prev Previous commit
Next Next commit
convert typing-only classes and variables to private
  • Loading branch information
macro1 committed Apr 1, 2025
commit a28b8174f9d617ec9855d77d578229ddbf1f039f
27 changes: 0 additions & 27 deletions stubs/grpcio/@tests/stubtest_allowlist.txt
Original file line number Diff line number Diff line change
@@ -1,30 +1,3 @@
# Error: is not present at runtime
# =============================
# Classes introduced in the typing library to provide interface structure.
grpc.Behaviour
grpc.CallFuture
grpc.CallIterator
grpc.CertificateChainPair
grpc.Interceptor
grpc.Metadata
grpc.RequestDeserializer
grpc.RequestSerializer
grpc.ResponseDeserializer
grpc.ResponseSerializer
grpc.aio.DoneCallback
grpc.aio.DoneCallbackType
grpc.aio.EOFType
grpc.aio.InterceptedCall
grpc.aio.MetadataKey
grpc.aio.MetadataType
grpc.aio.MetadataValue
grpc.aio.MetadatumType
grpc.aio.RequestSerializer
grpc.aio.ResponseDeserializer
grpc_health.v1.health.SendResponseCallback
grpc_reflection.v1alpha.reflection.AnyServer
grpc_reflection.v1alpha.reflection.AnyServicerContext

# Error: is not present at runtime
# =============================
# Error class attributes that aren't defined.
Expand Down
4 changes: 2 additions & 2 deletions stubs/grpcio/@tests/test_cases/check_aio.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
# Metadata
async def metadata() -> None:
metadata = await typing.cast(grpc.aio.Call, None).initial_metadata()
assert_type(metadata["foo"], grpc.aio.MetadataValue)
assert_type(metadata["foo"], grpc.aio._MetadataValue)
for k in metadata:
assert_type(k, str)

for k, v in metadata.items():
assert_type(k, str)
assert_type(v, grpc.aio.MetadataValue)
assert_type(v, grpc.aio._MetadataValue)
2 changes: 1 addition & 1 deletion stubs/grpcio/@tests/test_cases/check_grpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@
assert_type(call_details.timeout, typing.Optional[float])

# Call iterator
call_iter: grpc.CallIterator[str] = typing.cast(typing.Any, None)
call_iter: grpc._CallIterator[str] = typing.cast(typing.Any, None)
for call in call_iter:
assert_type(call, str)
Loading