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

Method not_equal_witness

Lib/tabnanny.py:215–224  ·  view source on GitHub ↗
(self, other)

Source from the content-addressed store, hash-verified

213 # Intended to be used after not self.equal(other) is known, in which
214 # case it will return at least one witnessing tab size.
215 def not_equal_witness(self, other):
216 n = max(self.longest_run_of_spaces(),
217 other.longest_run_of_spaces()) + 1
218 a = []
219 for ts in range(1, n+1):
220 if self.indent_level(ts) != other.indent_level(ts):
221 a.append( (ts,
222 self.indent_level(ts),
223 other.indent_level(ts)) )
224 return a
225
226 # Return True iff self.indent_level(t) < other.indent_level(t)
227 # for all t >= 1.

Callers 1

_process_tokensFunction · 0.80

Calls 3

longest_run_of_spacesMethod · 0.95
indent_levelMethod · 0.95
appendMethod · 0.45

Tested by

no test coverage detected