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

Function is_property

mypy/checker.py:9553–9561  ·  view source on GitHub ↗
(defn: SymbolNode)

Source from the content-addressed store, hash-verified

9551
9552
9553def is_property(defn: SymbolNode) -> bool:
9554 if isinstance(defn, FuncDef):
9555 return defn.is_property
9556 if isinstance(defn, Decorator):
9557 return defn.func.is_property
9558 if isinstance(defn, OverloadedFuncDef):
9559 if defn.items and isinstance(defn.items[0], Decorator):
9560 return defn.items[0].func.is_property
9561 return False
9562
9563
9564def is_settable_property(defn: SymbolNode | None) -> TypeGuard[OverloadedFuncDef]:

Callers 3

check_compatibilityMethod · 0.85
set_inferred_typeMethod · 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…