MCPcopy Create free account
hub / github.com/PaddlePaddle/Paddle / get_api_args

Function get_api_args

tools/check_api_yaml_same.py:55–63  ·  view source on GitHub ↗
(api_item)

Source from the content-addressed store, hash-verified

53
54
55def get_api_args(api_item):
56 result = re.search(r"args=\[(?P<args>[^\]]*)\]", api_item)
57 result = [
58 param.strip().replace('\'', '&#x27;)
59 for param in result.group('args').split(',')
60 ]
61 if result[-1] == 'name':
62 result = result[:-1]
63 return result
64
65
66def get_api_name(api_item):

Callers 1

Calls 4

searchMethod · 0.45
replaceMethod · 0.45
splitMethod · 0.45
groupMethod · 0.45

Tested by

no test coverage detected