MCPcopy
hub / github.com/lektor/lektor / _get_package_version_from_project

Function _get_package_version_from_project

lektor/packages.py:19–24  ·  view source on GitHub ↗
(cfg, name)

Source from the content-addressed store, hash-verified

17
18
19def _get_package_version_from_project(cfg, name):
20 choices = (name.lower(), "lektor-" + name.lower())
21 for pkg, version in cfg.section_as_dict("packages").items():
22 if pkg.lower() in choices:
23 return {"name": pkg, "version": version}
24 return None
25
26
27def add_package_to_project(project, req):

Callers 1

add_package_to_projectFunction · 0.85

Calls 1

itemsMethod · 0.45

Tested by

no test coverage detected