(self)
| 602 | self.registry = {} |
| 603 | |
| 604 | def __call__(self) -> _T: |
| 605 | key = self.scopefunc() |
| 606 | try: |
| 607 | return self.registry[key] # type: ignore[no-any-return] |
| 608 | except KeyError: |
| 609 | return self.registry.setdefault(key, self.createfunc()) # type: ignore[no-any-return] # noqa: E501 |
| 610 | |
| 611 | def has(self) -> bool: |
| 612 | """Return True if an object is present in the current scope.""" |
nothing calls this directly
no test coverage detected