MCPcopy
hub / github.com/williamngan/pts / parse_classes

Function parse_classes

parse.py:89–118  ·  view source on GitHub ↗
( mod, mod_name )

Source from the content-addressed store, hash-verified

87
88
89def parse_classes( mod, mod_name ):
90
91 if not 'children' in mod:
92 return []
93
94 _cls = [d for d in mod['children']]
95 names = []
96 for c in _cls:
97
98 if c['kindString'] != 'Variable' and not_private( c['name'] ) :
99
100 fullname =f"{mod_name}_{c['name']}"
101 classes[ fullname ] = props_class( c )
102
103 if c['kindString'] == "Type alias":
104 classes[ fullname ]['type_alias'] = get_type( c['type'] ).split(" | ")
105
106 else:
107 parse_class_children( classes[ fullname ], c, fullname )
108
109 names.append( c['name'] )
110 searchable( fullname, c['name'], c['kindString'] )
111
112 else:
113 skipped.append( f"{mod_name}_{c['name']}" )
114
115 # print("Skipped: ")
116 # print( skipped )
117
118 return names
119
120
121

Callers 1

parse_modulesFunction · 0.85

Calls 7

not_privateFunction · 0.85
props_classFunction · 0.85
get_typeFunction · 0.85
parse_class_childrenFunction · 0.85
searchableFunction · 0.85
appendMethod · 0.80
splitMethod · 0.45

Tested by

no test coverage detected