MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / strlist

Function strlist

imperative/python/megengine/utils/custom_op_tools.py:733–742  ·  view source on GitHub ↗
(args, name)

Source from the content-addressed store, hash-verified

731 MGE_ABI_VER = abi_tag
732
733 def strlist(args, name):
734 assert isinstance(args, str) or isinstance(
735 args, list
736 ), "{} must be str or list[str]".format(name)
737 if isinstance(args, str):
738 return [args]
739 for arg in args:
740 assert isinstance(arg, str)
741 args = [arg.strip() for arg in args]
742 return args
743
744 sources = strlist(sources, "sources")
745 extra_cflags = strlist(extra_cflags, "extra_cflags")

Callers 1

buildFunction · 0.85

Calls 1

formatMethod · 0.45

Tested by

no test coverage detected