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

Function skip_comment

Lib/tomllib/_parser.py:337–346  ·  view source on GitHub ↗
(src: str, pos: Pos)

Source from the content-addressed store, hash-verified

335
336
337def skip_comment(src: str, pos: Pos) -> Pos:
338 try:
339 char: str | None = src[pos]
340 except IndexError:
341 char = None
342 if char == "#":
343 return skip_until(
344 src, pos + 1, "\n", error_on=ILLEGAL_COMMENT_CHARS, error_on_eof=False
345 )
346 return pos
347
348
349def skip_comments_and_array_ws(src: str, pos: Pos) -> Pos:

Callers 2

loadsFunction · 0.85

Calls 1

skip_untilFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…