MCPcopy Create free account
hub / github.com/apple/coremltools / MakeClass

Function MakeClass

deps/protobuf/python/google/protobuf/reflection.py:82–95  ·  view source on GitHub ↗

Construct a class object for a protobuf described by descriptor. DEPRECATED: use MessageFactory.GetPrototype() instead. Args: descriptor: A descriptor.Descriptor object describing the protobuf. Returns: The Message class object described by the descriptor.

(descriptor)

Source from the content-addressed store, hash-verified

80
81# Deprecated. Please NEVER use reflection.MakeClass().
82def MakeClass(descriptor):
83 """Construct a class object for a protobuf described by descriptor.
84
85 DEPRECATED: use MessageFactory.GetPrototype() instead.
86
87 Args:
88 descriptor: A descriptor.Descriptor object describing the protobuf.
89 Returns:
90 The Message class object described by the descriptor.
91 """
92 # Original implementation leads to duplicate message classes, which won't play
93 # well with extensions. Message factory info is also missing.
94 # Redirect to message_factory.
95 return symbol_database.Default().GetPrototype(descriptor)

Callers 1

ParseMessageFunction · 0.85

Calls 1

GetPrototypeMethod · 0.45

Tested by

no test coverage detected