Unsure to what degree this might be considered a grpcio bug. When generating python code, this class is defined:
class DeviceCapability(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
__slots__ = ()
None: _ClassVar[DeviceCapability]
ReadMemory: _ClassVar[DeviceCapability]
WriteMemory: _ClassVar[DeviceCapability]
...
But None is a reserved keyword, so it doesn't get created in the namespace as an attribute. It just sits there as a statement I guess. The type hint causes my IDE to be upset, but nothing crashes.
It does mean that it's impossible to reference DeviceCapability.None. I'm not sure if explicitly using the int is a workaround. This isn't blocking me on anything, I just happened to notice it when looking through the generated code.
Unsure to what degree this might be considered a
grpciobug. When generating python code, this class is defined:But
Noneis a reserved keyword, so it doesn't get created in the namespace as an attribute. It just sits there as a statement I guess. The type hint causes my IDE to be upset, but nothing crashes.It does mean that it's impossible to reference
DeviceCapability.None. I'm not sure if explicitly using the int is a workaround. This isn't blocking me on anything, I just happened to notice it when looking through the generated code.