MCPcopy
hub / github.com/lutzroeder/netron / _createType

Method _createType

source/python.js:22480–22488  ·  view source on GitHub ↗
(name, value)

Source from the content-addressed store, hash-verified

22478 }
22479
22480 _createType(name, value) {
22481 const builtins = this.builtins;
22482 const index = name.lastIndexOf('.');
22483 value.__class__ = builtins.type;
22484 value.__name__ = index === -1 ? name : name.substring(index + 1);
22485 value.__module__ = index === -1 ? '' : name.substring(0, index);
22486 value.prototype.__class__ = value;
22487 return value;
22488 }
22489
22490 registerType(name, value) {
22491 value = this._createType(name, value);

Callers 3

resolveMethod · 0.80
statementMethod · 0.80
registerTypeMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected