MCPcopy Index your code
hub / github.com/python/mypy / get_fullname

Method get_fullname

mypy/stubgen.py:819–829  ·  view source on GitHub ↗

Return the expression's full name.

(self, expr: Expression)

Source from the content-addressed store, hash-verified

817 self._decorators.append(f"@{decorator.accept(p)}")
818
819 def get_fullname(self, expr: Expression) -> str:
820 """Return the expression's full name."""
821 if (
822 self.analyzed
823 and isinstance(expr, (NameExpr, MemberExpr))
824 and expr.fullname
825 and not (isinstance(expr.node, Var) and expr.node.is_suppressed_import)
826 ):
827 return expr.fullname
828 name = get_qualified_name(expr)
829 return self.resolve_name(name)
830
831 def visit_class_def(self, o: ClassDef) -> None:
832 self._class_stack.append(o)

Callers 11

process_decoratorMethod · 0.95
get_base_typesMethod · 0.95
is_dataclassMethod · 0.95
is_namedtupleMethod · 0.95
is_typed_namedtupleMethod · 0.95
is_typeddictMethod · 0.95
is_alias_expressionMethod · 0.95
_visit_ref_exprMethod · 0.80
visit_index_exprMethod · 0.80

Calls 3

isinstanceFunction · 0.85
get_qualified_nameFunction · 0.85
resolve_nameMethod · 0.80

Tested by

no test coverage detected