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

Function increment_until

Lib/traceback.py:894–904  ·  view source on GitHub ↗

Get the next valid non-"\\#" character that satisfies the `stop` predicate

(lineno, col, stop)

Source from the content-addressed store, hash-verified

892 return lineno, col
893
894 def increment_until(lineno, col, stop):
895 """Get the next valid non-"\\#" character that satisfies the `stop` predicate"""
896 while True:
897 ch = lines[lineno][col]
898 if ch in "\\#":
899 lineno, col = nextline(lineno, col)
900 elif not stop(ch):
901 lineno, col = increment(lineno, col)
902 else:
903 break
904 return lineno, col
905
906 def setup_positions(expr, force_valid=True):
907 """Get the lineno/col position of the end of `expr`. If `force_valid` is True,

Calls 3

nextlineFunction · 0.85
stopFunction · 0.85
incrementFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…