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

Method parse

src/packagedcode/chef.py:186–197  ·  view source on GitHub ↗

Yield one or more Package manifest objects given a file ``location`` pointing to a package archive, manifest or similar.

(cls, location, package_only=False)

Source from the content-addressed store, hash-verified

184
185 @classmethod
186 def parse(cls, location, package_only=False):
187 """
188 Yield one or more Package manifest objects given a file ``location``
189 pointing to a package archive, manifest or similar.
190 """
191 with io.open(location, encoding='utf-8') as loc:
192 package_data = json.load(loc)
193 yield build_package(
194 package_data=package_data,
195 datasource_id=cls.datasource_id,
196 package_only=package_only,
197 )
198
199
200class ChefMetadataRbHandler(BaseChefMetadataHandler):

Callers

nothing calls this directly

Calls 3

build_packageFunction · 0.70
openMethod · 0.45
loadMethod · 0.45

Tested by

no test coverage detected