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

Function read_api

tools/check_api_yaml_same.py:42–52  ·  view source on GitHub ↗
(api_file)

Source from the content-addressed store, hash-verified

40
41
42def read_api(api_file):
43 with open(api_file, 'r') as f:
44 pr_apis = f.read()
45 pr_apis = pr_apis.splitlines()
46 result = []
47 for api in pr_apis:
48 # Delete all non-function api
49 if api.find('args') == -1:
50 continue
51 result.append(api)
52 return result
53
54
55def get_api_args(api_item):

Callers 2

get_api_diffFunction · 0.85

Calls 3

readMethod · 0.45
findMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected