MCPcopy Create free account
hub / github.com/python/mypy / cannot_resolve_name

Method cannot_resolve_name

mypy/semanal.py:7394–7398  ·  view source on GitHub ↗
(self, name: str | None, kind: str, ctx: Context)

Source from the content-addressed store, hash-verified

7392 self.defer(ctx, force_progress=force_progress)
7393
7394 def cannot_resolve_name(self, name: str | None, kind: str, ctx: Context) -> None:
7395 name_format = f' "{name}"' if name else ""
7396 self.fail(f"Cannot resolve {kind}{name_format} (possible cyclic definition)", ctx)
7397 if self.is_func_scope():
7398 self.note("Recursive types are not allowed at function scope", ctx)
7399
7400 def qualified_name(self, name: str) -> str:
7401 if self.type is not None:

Callers 3

visit_type_alias_stmtMethod · 0.95
process_placeholderMethod · 0.95

Calls 3

failMethod · 0.95
is_func_scopeMethod · 0.95
noteMethod · 0.95

Tested by

no test coverage detected