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

Function _is_decoratable

mypy/stubtest.py:462–472  ·  view source on GitHub ↗
(stub: nodes.SymbolNode)

Source from the content-addressed store, hash-verified

460
461
462def _is_decoratable(stub: nodes.SymbolNode) -> bool:
463 if not isinstance(stub, nodes.TypeInfo):
464 return False
465 if stub.is_newtype:
466 return False
467 if stub.typeddict_type is not None:
468 return all(
469 name.isidentifier() and not keyword.iskeyword(name)
470 for name in stub.typeddict_type.items.keys()
471 )
472 return True
473
474
475def _verify_final(

Callers 1

verify_mypyfileFunction · 0.85

Calls 3

isinstanceFunction · 0.85
allFunction · 0.85
keysMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…