MCPcopy Index your code
hub / github.com/apache/caldera / ParserSchema

Class ParserSchema

app/objects/secondclass/c_parser.py:7–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5
6
7class ParserSchema(ma.Schema):
8
9 module = ma.fields.String()
10 parserconfigs = ma.fields.List(ma.fields.Nested(ParserConfigSchema()))
11
12 @ma.post_load()
13 def build_parser(self, data, **_):
14 return Parser(**data)
15
16 @ma.post_dump()
17 def prepare_parser(self, data, **_):
18 for pc, index in enumerate(data['parserconfigs']):
19 if isinstance(pc, ParserConfig):
20 data['parserconfigs'][index] = pc.display
21 return data
22
23
24class Parser(BaseObject):

Callers 2

ExecutorSchemaClass · 0.90
ParserClass · 0.85

Calls 1

ParserConfigSchemaClass · 0.90

Tested by

no test coverage detected