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

Function refers_to_class_or_function

mypy/semanal.py:8232–8236  ·  view source on GitHub ↗

Does semantically analyzed node refer to a class?

(node: Expression)

Source from the content-addressed store, hash-verified

8230
8231
8232def refers_to_class_or_function(node: Expression) -> bool:
8233 """Does semantically analyzed node refer to a class?"""
8234 return isinstance(node, RefExpr) and isinstance(
8235 node.node, (TypeInfo, FuncDef, OverloadedFuncDef)
8236 )
8237
8238
8239def find_duplicate(list: list[T]) -> T | None:

Callers 1

visit_index_exprMethod · 0.85

Calls 1

isinstanceFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…