Calculate attributes that are always initialized by a super().__init__ call.
(op: Call)
| 284 | |
| 285 | |
| 286 | def attributes_initialized_by_init_call(op: Call) -> set[str]: |
| 287 | """Calculate attributes that are always initialized by a super().__init__ call.""" |
| 288 | self_type = op.fn.sig.args[0].type |
| 289 | assert isinstance(self_type, RInstance), self_type |
| 290 | cl = self_type.class_ir |
| 291 | return {a for base in cl.mro for a in base.attributes if base.is_always_defined(a)} |
| 292 | |
| 293 | |
| 294 | def attributes_maybe_initialized_by_init_call(op: Call) -> set[str]: |
no test coverage detected
searching dependent graphs…