MCPcopy Create free account
hub / github.com/python/mypy / _get_frozen

Function _get_frozen

mypy/plugins/attrs.py:414–422  ·  view source on GitHub ↗

Return whether this class is frozen.

(ctx: mypy.plugin.ClassDefContext, frozen_default: bool)

Source from the content-addressed store, hash-verified

412
413
414def _get_frozen(ctx: mypy.plugin.ClassDefContext, frozen_default: bool) -> bool:
415 """Return whether this class is frozen."""
416 if _get_decorator_bool_argument(ctx, "frozen", frozen_default):
417 return True
418 # Subclasses of frozen classes are frozen so check that.
419 for super_info in ctx.cls.info.mro[1:-1]:
420 if "attrs" in super_info.metadata and super_info.metadata["attrs"]["frozen"]:
421 return True
422 return False
423
424
425def _analyze_class(

Callers 1

Calls 1

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…