(self, node: SN)
| 348 | # Helpers |
| 349 | |
| 350 | def fixup(self, node: SN) -> SN: |
| 351 | if node in self.replacements: |
| 352 | new = self.replacements[node] |
| 353 | if isinstance(node, TypeInfo) and isinstance(new, TypeInfo): |
| 354 | # Special case: special_alias is not exposed in symbol tables, but may appear |
| 355 | # in external types (e.g. named tuples), so we need to update it manually. |
| 356 | replace_object_state(new.special_alias, node.special_alias) |
| 357 | replace_object_state(new, node, skip_slots=_get_ignored_slots(new)) |
| 358 | return cast(SN, new) |
| 359 | return node |
| 360 | |
| 361 | def fixup_and_reset_typeinfo(self, node: TypeInfo) -> TypeInfo: |
| 362 | """Fix-up type info and reset subtype caches. |
no test coverage detected