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

Function non_trivial_sources

mypyc/analysis/dataflow.py:461–466  ·  view source on GitHub ↗
(op: Op)

Source from the content-addressed store, hash-verified

459
460
461def non_trivial_sources(op: Op) -> set[Value]:
462 result = set()
463 for source in op.sources():
464 if not isinstance(source, (Integer, Float, Undef)):
465 result.add(source)
466 return result
467
468
469class LivenessVisitor(BaseAnalysisVisitor[Value]):

Callers 5

visit_branchMethod · 0.85
visit_register_opMethod · 0.85
visit_assignMethod · 0.85
visit_assign_multiMethod · 0.85
visit_set_memMethod · 0.85

Calls 4

setClass · 0.85
isinstanceFunction · 0.85
sourcesMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…