(self)
| 662 | self.registry = threading.local() |
| 663 | |
| 664 | def __call__(self) -> _T: |
| 665 | try: |
| 666 | return self.registry.value # type: ignore[no-any-return] |
| 667 | except AttributeError: |
| 668 | val = self.registry.value = self.createfunc() |
| 669 | return val |
| 670 | |
| 671 | def has(self) -> bool: |
| 672 | return hasattr(self.registry, "value") |
nothing calls this directly
no test coverage detected