MCPcopy Index your code
hub / github.com/nodejs/node / __init__

Method __init__

deps/inspector_protocol/code_generator.py:367–388  ·  view source on GitHub ↗
(self, config)

Source from the content-addressed store, hash-verified

365class Protocol(object):
366
367 def __init__(self, config):
368 self.config = config
369 self.json_api = {"domains": []}
370 self.source_set = set()
371 self.imported_domains = []
372 self.exported_domains = []
373 self.generate_domains = self.read_protocol_file(config.protocol.path)
374
375 if config.protocol.options:
376 self.generate_domains = [rule.domain for rule in config.protocol.options]
377 self.exported_domains = [rule.domain for rule in config.protocol.options
378 if hasattr(rule, "exported")]
379
380 if config.imported:
381 self.imported_domains = self.read_protocol_file(config.imported.path)
382 if config.imported.options:
383 self.imported_domains = [rule.domain
384 for rule in config.imported.options]
385
386 self.patch_full_qualified_refs()
387 self.create_type_definitions()
388 self.generate_used_types()
389
390 def read_protocol_file(self, file_name):
391 input_file = open(file_name, "r")

Callers

nothing calls this directly

Calls 5

read_protocol_fileMethod · 0.95
generate_used_typesMethod · 0.95
setFunction · 0.50

Tested by

no test coverage detected