Fix static type checking for grpclib client (#124)
* Fix static type checking in grpclib client * Fix python3.6 compatibility issue with dataclasses
This commit is contained in:
committed by
GitHub
parent
3d8c0cb713
commit
beafc812ff
@@ -664,7 +664,8 @@ class Message(ABC):
|
||||
"""Get the message class for a field from the type hints."""
|
||||
field_cls = cls._type_hint(field.name)
|
||||
if hasattr(field_cls, "__args__") and index >= 0:
|
||||
field_cls = field_cls.__args__[index]
|
||||
if field_cls.__args__ is not None:
|
||||
field_cls = field_cls.__args__[index]
|
||||
return field_cls
|
||||
|
||||
def _get_field_default(self, field_name):
|
||||
|
Reference in New Issue
Block a user