MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / less

Method less

tools/python-3.11.9-amd64/Lib/tabnanny.py:240–251  ·  view source on GitHub ↗
(self, other)

Source from the content-addressed store, hash-verified

238 # XXXwrite that up.
239 # Note that M is of the form (T*)(S*) iff len(M.norm[0]) <= 1.
240 def less(self, other):
241 if self.n >= other.n:
242 return False
243 if self.is_simple and other.is_simple:
244 return self.nt <= other.nt
245 n = max(self.longest_run_of_spaces(),
246 other.longest_run_of_spaces()) + 1
247 # the self.n >= other.n test already did it for ts=1
248 for ts in range(2, n+1):
249 if self.indent_level(ts) >= other.indent_level(ts):
250 return False
251 return True
252
253 # return a list of tuples (ts, i1, i2) such that
254 # i1 == self.indent_level(ts) >= other.indent_level(ts) == i2.

Callers 1

process_tokensFunction · 0.80

Calls 3

longest_run_of_spacesMethod · 0.95
indent_levelMethod · 0.95
maxFunction · 0.85

Tested by

no test coverage detected