MCPcopy Index your code
hub / github.com/RustPython/RustPython / not_equal_witness

Method not_equal_witness

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

Source from the content-addressed store, hash-verified

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

Callers 1

_process_tokensFunction · 0.80

Calls 4

longest_run_of_spacesMethod · 0.95
indent_levelMethod · 0.95
maxFunction · 0.85
appendMethod · 0.45

Tested by

no test coverage detected