shabbyrobe / grpc-stubs

gRPC typing stubs for Python
MIT License
36 stars 21 forks source link

Missing grpc StatusCode #31

Closed HawkeyeCov closed 2 years ago

HawkeyeCov commented 2 years ago

Description of issue

Problem: Status code "OUT_OF_RANGE" is defined in google.rpc but is not present in grpc-stubs.

Solution: Add + OUT_OF_RANGE = ... to grpc-stubs/__init__.pyi

Minimum Reproducible Example

Mypy fails with no attribute "OUT_OF_RANGE":

example.py #check with mypy example.py import grpc status1 = grpc.StatusCode.CANCELLED # Okay status2 = grpc.StatusCode.OUT_OF_RANGE # Error!
shabbyrobe commented 2 years ago

Thank you! Just published 1.24.11.