MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _mapped_collection_cls

Function _mapped_collection_cls

lib/sqlalchemy/orm/mapped_collection.py:513–524  ·  view source on GitHub ↗
(
    keyfunc: Callable[[Any], Any], ignore_unpopulated_attribute: bool
)

Source from the content-addressed store, hash-verified

511
512
513def _mapped_collection_cls(
514 keyfunc: Callable[[Any], Any], ignore_unpopulated_attribute: bool
515) -> Type[KeyFuncDict[_KT, _KT]]:
516 class _MKeyfuncMapped(KeyFuncDict[_KT, _KT]):
517 def __init__(self, *dict_args: Any) -> None:
518 super().__init__(
519 keyfunc,
520 *dict_args,
521 ignore_unpopulated_attribute=ignore_unpopulated_attribute,
522 )
523
524 return _MKeyfuncMapped
525
526
527MappedCollection = KeyFuncDict

Callers 3

column_keyed_dictFunction · 0.85
attribute_keyed_dictFunction · 0.85
keyfunc_mappingFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected