MCPcopy Create free account
hub / github.com/antmachineintelligence/mtgbmcode / get_alias

Function get_alias

helpers/parameter_generator.py:99–120  ·  view source on GitHub ↗

Get aliases of all parameters. Parameters ---------- infos : list Content of the config header file. Returns ------- pairs : list List of tuples (param alias, param name).

(infos)

Source from the content-addressed store, hash-verified

97
98
99def get_alias(infos):
100 """Get aliases of all parameters.
101
102 Parameters
103 ----------
104 infos : list
105 Content of the config header file.
106
107 Returns
108 -------
109 pairs : list
110 List of tuples (param alias, param name).
111 """
112 pairs = []
113 for x in infos:
114 for y in x:
115 if "alias" in y:
116 name = y["name"][0]
117 alias = y["alias"][0].split(',')
118 for name2 in alias:
119 pairs.append((name2.strip(), name))
120 return pairs
121
122
123def set_one_var_from_string(name, param_type, checks):

Callers 1

gen_parameter_codeFunction · 0.85

Calls 1

appendMethod · 0.80

Tested by

no test coverage detected