MCPcopy
hub / github.com/python/mypy / _verify_final_method

Function _verify_final_method

mypy/stubtest.py:1528–1536  ·  view source on GitHub ↗
(
    stub: nodes.FuncDef, runtime: Any, static_runtime: MaybeMissing[Any]
)

Source from the content-addressed store, hash-verified

1526
1527
1528def _verify_final_method(
1529 stub: nodes.FuncDef, runtime: Any, static_runtime: MaybeMissing[Any]
1530) -> Iterator[str]:
1531 if stub.is_final:
1532 return
1533 if getattr(runtime, "__final__", False) or (
1534 static_runtime is not MISSING and getattr(static_runtime, "__final__", False)
1535 ):
1536 yield "is decorated with @final at runtime, but not in the stub"
1537
1538
1539def _resolve_funcitem_from_decorator(dec: nodes.OverloadPart) -> nodes.FuncItem | None:

Callers 2

verify_funcitemFunction · 0.85

Calls 1

getattrFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…