(self)
| 638 | self.registry = threading.local() |
| 639 | |
| 640 | def __call__(self) -> _T: |
| 641 | try: |
| 642 | return self.registry.value # type: ignore[no-any-return] |
| 643 | except AttributeError: |
| 644 | val = self.registry.value = self.createfunc() |
| 645 | return val |
| 646 | |
| 647 | def has(self) -> bool: |
| 648 | return hasattr(self.registry, "value") |
nothing calls this directly
no test coverage detected