MCPcopy
hub / github.com/beetbox/beets / named_queries

Function named_queries

beets/plugins.py:520–527  ·  view source on GitHub ↗

Return mapping between field names and queries for the given model.

(model_cls: type[AnyModel])

Source from the content-addressed store, hash-verified

518
519
520def named_queries(model_cls: type[AnyModel]) -> dict[str, FieldQueryType]:
521 """Return mapping between field names and queries for the given model."""
522 attr_name = f"{model_cls.__name__.lower()}_queries"
523 return {
524 field: query
525 for plugin in find_plugins()
526 for field, query in getattr(plugin, attr_name, {}).items()
527 }
528
529
530def notify_info_yielded(

Callers

nothing calls this directly

Calls 2

find_pluginsFunction · 0.85
itemsMethod · 0.45

Tested by

no test coverage detected