(self)
| 3127 | self.manager.add_stats(fresh_trees=1) |
| 3128 | |
| 3129 | def fix_cross_refs(self) -> None: |
| 3130 | assert self.tree is not None, "Internal error: method must be called on parsed file only" |
| 3131 | # Do initial lightweight pass fixing TypeInfos and module cross-references. |
| 3132 | assert modules_state.node_fixer is not None |
| 3133 | modules_state.node_fixer.visit_symbol_table(self.tree.names) |
| 3134 | type_fixer = modules_state.node_fixer.type_fixer |
| 3135 | # Eagerly fix shared instances, before they are used by named_type() calls. |
| 3136 | if instance_cache.str_type is not None: |
| 3137 | instance_cache.str_type.accept(type_fixer) |
| 3138 | if instance_cache.function_type is not None: |
| 3139 | instance_cache.function_type.accept(type_fixer) |
| 3140 | if instance_cache.int_type is not None: |
| 3141 | instance_cache.int_type.accept(type_fixer) |
| 3142 | if instance_cache.bool_type is not None: |
| 3143 | instance_cache.bool_type.accept(type_fixer) |
| 3144 | if instance_cache.object_type is not None: |
| 3145 | instance_cache.object_type.accept(type_fixer) |
| 3146 | |
| 3147 | # Methods for processing modules from source code. |
| 3148 |
no test coverage detected