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

Function get_package_info

src/scancode/api.py:295–308  ·  view source on GitHub ↗

Return a mapping of package information detected in the file at `location`. This API function is DEPRECATED, use `get_package_data` instead.

(location, **kwargs)

Source from the content-addressed store, hash-verified

293
294
295def get_package_info(location, **kwargs):
296 """
297 Return a mapping of package information detected in the file at `location`.
298 This API function is DEPRECATED, use `get_package_data` instead.
299 """
300 import warnings
301 warnings.warn(
302 "`get_package_info` is deprecated. Use `get_package_data` instead.",
303 DeprecationWarning,
304 stacklevel=1
305 )
306
307 packages = _get_package_data(location, **kwargs) or []
308 return dict(packages=[p.to_dict() for p in packages])
309
310
311def get_package_data(

Callers

nothing calls this directly

Calls 2

_get_package_dataFunction · 0.85
to_dictMethod · 0.45

Tested by

no test coverage detected