MCPcopy
hub / github.com/ormar-orm/ormar / _make_key

Method _make_key

ormar/models/excludable.py:389–396  ·  view source on GitHub ↗

Build the items-dict key for ``(alias, model)``. Centralized so every call site shares one definition of "which Excludable is this".

(model_cls: type["Model"], alias: str = "")

Source from the content-addressed store, hash-verified

387
388 @staticmethod
389 def _make_key(model_cls: type["Model"], alias: str = "") -> str:
390 """
391 Build the items-dict key for ``(alias, model)``. Centralized so
392 every call site shares one definition of "which Excludable is
393 this".
394 """
395 prefix = f"{alias}_" if alias else ""
396 return f"{prefix}{model_cls.get_name(lower=True)}"
397
398 @staticmethod
399 def _resolve_path(

Callers 4

_referenced_atMethod · 0.95
getMethod · 0.95
_set_slotMethod · 0.95

Calls 1

get_nameMethod · 0.80

Tested by

no test coverage detected