MCPcopy Index your code
hub / github.com/codespell-project/codespell / print_context

Function print_context

codespell_lib/_codespell.py:854–862  ·  view source on GitHub ↗
(
    lines: list[str],
    index: int,
    context: tuple[int, int],
)

Source from the content-addressed store, hash-verified

852
853
854def print_context(
855 lines: list[str],
856 index: int,
857 context: tuple[int, int],
858) -> None:
859 # context = (context_before, context_after)
860 for i in range(index - context[0], index + context[1] + 1):
861 if 0 <= i < len(lines):
862 print(f"{'>' if i == index else ':'} {lines[i].rstrip()}")
863
864
865def _ignore_word_sub(

Callers 1

parse_linesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…