Return whether this class is frozen.
(ctx: mypy.plugin.ClassDefContext, frozen_default: bool)
| 412 | |
| 413 | |
| 414 | def _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 | |
| 425 | def _analyze_class( |
no test coverage detected
searching dependent graphs…