MCPcopy Create free account
hub / github.com/ElementsProject/lightning / output_type

Function output_type

tools/fromschema.py:89–97  ·  view source on GitHub ↗

Add types for request and reponse parameters

(properties, is_optional)

Source from the content-addressed store, hash-verified

87
88
89def output_type(properties, is_optional):
90 """Add types for request and reponse parameters"""
91 typename = 'one of' if 'oneOf' in properties else esc_underscores(properties.get('type', 'any'))
92 if typename == 'array':
93 if 'items' in properties and 'type' in properties['items']:
94 typename += ' of {}s'.format(esc_underscores(properties['items']['type']))
95 if is_optional:
96 typename += ', optional'
97 output(' ({})'.format(esc_underscores(typename)))
98
99
100def output_range(properties):

Callers 2

output_memberFunction · 0.70
output_arrayFunction · 0.70

Calls 3

esc_underscoresFunction · 0.85
outputFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected