(self, mod: ast3.Module)
| 876 | return id |
| 877 | |
| 878 | def visit_Module(self, mod: ast3.Module) -> MypyFile: |
| 879 | self.type_ignores = {} |
| 880 | self.uses_template_strings = False |
| 881 | for ti in mod.type_ignores: |
| 882 | parsed = parse_type_ignore_tag(ti.tag) |
| 883 | if parsed is not None: |
| 884 | self.type_ignores[ti.lineno] = parsed |
| 885 | else: |
| 886 | self.fail(message_registry.INVALID_TYPE_IGNORE, ti.lineno, -1, blocker=False) |
| 887 | |
| 888 | body = self.fix_function_overloads(self.translate_stmt_list(mod.body, ismodule=True)) |
| 889 | |
| 890 | ret = MypyFile(body, self.imports, False, ignored_lines=self.type_ignores) |
| 891 | ret.is_stub = self.is_stub |
| 892 | ret.path = self.path |
| 893 | ret.uses_template_strings = self.uses_template_strings |
| 894 | return ret |
| 895 | |
| 896 | # --- stmt --- |
| 897 | # FunctionDef(identifier name, arguments args, |
nothing calls this directly
no test coverage detected