MCPcopy Index your code
hub / github.com/python/cpython / is_active

Method is_active

Lib/graphlib.py:138–150  ·  view source on GitHub ↗

Return ``True`` if more progress can be made and ``False`` otherwise. Progress can be made if cycles do not block the resolution and either there are still nodes ready that haven't yet been returned by "get_ready" or the number of nodes marked "done" is less than the number

(self)

Source from the content-addressed store, hash-verified

136 return result
137
138 def is_active(self):
139 """Return ``True`` if more progress can be made and ``False`` otherwise.
140
141 Progress can be made if cycles do not block the resolution and either there
142 are still nodes ready that haven't yet been returned by "get_ready" or the
143 number of nodes marked "done" is less than the number that have been returned
144 by "get_ready".
145
146 Raises ValueError if called without calling "prepare" previously.
147 """
148 if self._ready_nodes is None:
149 raise ValueError("prepare() must be called first")
150 return self._nfinished < self._npassedout or bool(self._ready_nodes)
151
152 def __bool__(self):
153 return self.is_active()

Callers 5

__bool__Method · 0.95
static_orderMethod · 0.95
test_doneMethod · 0.95
test_is_activeMethod · 0.95

Calls

no outgoing calls

Tested by 3

test_doneMethod · 0.76
test_is_activeMethod · 0.76