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

Function dedup

Lib/test/test_code.py:1358–1362  ·  view source on GitHub ↗
(lst, prev=object())

Source from the content-addressed store, hash-verified

1356 yield (line, end_line, col, end_col)
1357
1358def dedup(lst, prev=object()):
1359 for item in lst:
1360 if item != prev:
1361 yield item
1362 prev = item
1363
1364def lines_from_postions(positions):
1365 return dedup(l for (l, _, _, _) in positions)

Callers 2

lines_from_postionsFunction · 0.85
check_linesMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected