(
self,
key: str,
state: InstanceState[_O],
factory: _CollectionFactoryType,
)
| 464 | return collections._prepare_instrumentation(collection_class) |
| 465 | |
| 466 | def initialize_collection( |
| 467 | self, |
| 468 | key: str, |
| 469 | state: InstanceState[_O], |
| 470 | factory: _CollectionFactoryType, |
| 471 | ) -> Tuple[collections.CollectionAdapter, _AdaptedCollectionProtocol]: |
| 472 | user_data = factory() |
| 473 | impl = self.get_impl(key) |
| 474 | assert _is_collection_attribute_impl(impl) |
| 475 | adapter = collections.CollectionAdapter(impl, state, user_data) |
| 476 | return adapter, user_data |
| 477 | |
| 478 | def is_instrumented(self, key: str, search: bool = False) -> bool: |
| 479 | if search: |
no test coverage detected