MCPcopy Create free account
hub / github.com/aboutcode-org/scancode-toolkit / loads

Method loads

src/packagedcode/godeps.py:145–157  ·  view source on GitHub ↗

Load a Godeps JSON text.

(self, text)

Source from the content-addressed store, hash-verified

143 return self.loads(text)
144
145 def loads(self, text):
146 """
147 Load a Godeps JSON text.
148 """
149 data = json.loads(text)
150
151 for key, value in data.items():
152 name = NAMES.get(key)
153 if name == 'dependencies':
154 self.dependencies = self.parse_deps(value)
155 else:
156 setattr(self, name, value)
157 return self
158
159 def parse_deps(self, deps):
160 """

Callers 15

loadMethod · 0.95
test_parse_basicMethod · 0.95
scanFunction · 0.80
fetch_spdx_licensesMethod · 0.80
parseMethod · 0.80
parseMethod · 0.80
parseMethod · 0.80
check_jsonlines_scanFunction · 0.80
_get_scan_data_helperMethod · 0.80
test_parse_rpm_xmlishMethod · 0.80

Calls 2

parse_depsMethod · 0.95
getMethod · 0.65