MCPcopy Create free account
hub / github.com/MegEngine/MegFlow / decorator

Function decorator

flow-python/megflow/registry.py:42–48  ·  view source on GitHub ↗
(func)

Source from the content-addressed store, hash-verified

40
41def register(name=None, inputs=[], outputs=[], exclusive=False):
42 def decorator(func):
43 nonlocal name
44 global _PLUGINS_REGISTRY
45 if name is None:
46 name = func.__name__
47 _PLUGINS_REGISTRY[__NODES_PLUGINS].append(__register(name, inputs, outputs, exclusive, func))
48 return func
49
50 return decorator
51

Callers

nothing calls this directly

Calls 3

__registerFunction · 0.85
__res_registerFunction · 0.85
appendMethod · 0.80

Tested by

no test coverage detected