(self, imp: ImportFrom | ImportAll)
| 126 | self.process_import(imp) |
| 127 | |
| 128 | def process_import(self, imp: ImportFrom | ImportAll) -> None: |
| 129 | import_id, ok = correct_relative_import( |
| 130 | self.cur_mod_id, imp.relative, imp.id, self.cur_mod_node.is_package_init_file() |
| 131 | ) |
| 132 | if ok and import_id in self.modules: |
| 133 | kind = TYPE_PRECISE |
| 134 | else: |
| 135 | kind = TYPE_ANY |
| 136 | self.record_line(imp.line, kind) |
| 137 | |
| 138 | def visit_import(self, imp: Import) -> None: |
| 139 | if all(id in self.modules for id, _ in imp.ids): |
no test coverage detected