MCPcopy
hub / github.com/lektor/lektor / _mapping_from_cursor

Function _mapping_from_cursor

lektor/sourcesearch.py:28–41  ·  view source on GitHub ↗
(cur)

Source from the content-addressed store, hash-verified

26
27
28def _mapping_from_cursor(cur):
29 rv = {}
30 for path, alt, lang, type, title in cur.fetchall():
31 rv.setdefault(path, []).append(
32 {
33 "id": _id_from_path(path),
34 "path": path,
35 "alt": alt,
36 "type": type,
37 "lang": lang,
38 "title": title,
39 }
40 )
41 return rv
42
43
44def _find_best_info(infos, alt, lang):

Callers 1

_process_search_resultsFunction · 0.85

Calls 2

_id_from_pathFunction · 0.85
appendMethod · 0.45

Tested by

no test coverage detected