MCPcopy Create free account
hub / github.com/chronoxor/FastBinaryEncoding / EnumEmpty

Class EnumEmpty

projects/Python/proto/test.py:236–255  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

234
235
236class EnumEmpty(enum.IntEnum, metaclass=fbe.DefaultEnumMeta):
237 unknown = ~0
238
239 __slots__ = ()
240
241 def __format__(self, format_spec):
242 return self.__str__()
243
244 def __str__(self):
245 return "<empty>"
246
247 @classmethod
248 def _missing_(cls, value):
249 return EnumEmpty.unknown
250
251 @staticmethod
252 def __from_json__(value):
253 if value is None:
254 return None
255 return EnumEmpty(value)
256
257
258# Fast Binary Encoding EnumEmpty field model

Callers 3

__from_json__Method · 0.70
getMethod · 0.70
getMethod · 0.70

Calls

no outgoing calls

Tested by 3

__from_json__Method · 0.56
getMethod · 0.56
getMethod · 0.56