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

Function res_register

flow-python/megflow/registry.py:53–62  ·  view source on GitHub ↗
(name=None)

Source from the content-addressed store, hash-verified

51
52
53def res_register(name=None):
54 def decorator(func):
55 nonlocal name
56 global _PLUGINS_REGISTRY
57 if name is None:
58 name = func.__name__
59 _PLUGINS_REGISTRY[__RESOURCE_PLUGINS].append(__res_register(name, func))
60 return func
61
62 return decorator
63
64
65def collect():

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected