MCPcopy Index your code
hub / github.com/python/mypy / _is_django_cached_property

Function _is_django_cached_property

mypy/stubtest.py:1477–1487  ·  view source on GitHub ↗
(runtime: Any)

Source from the content-addressed store, hash-verified

1475
1476
1477def _is_django_cached_property(runtime: Any) -> bool: # pragma: no cover
1478 # This is a special case for
1479 # https://docs.djangoproject.com/en/5.2/ref/utils/#django.utils.functional.cached_property
1480 # This is needed in `django-stubs` project:
1481 # https://github.com/typeddjango/django-stubs
1482 if type(runtime).__name__ != "cached_property":
1483 return False
1484 try:
1485 return bool(runtime.func)
1486 except Exception:
1487 return False
1488
1489
1490def _verify_readonly_property(stub: nodes.Decorator, runtime: Any) -> Iterator[str]:

Callers 1

Calls 2

typeClass · 0.85
boolClass · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…