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

Function count_todo_in_path

scripts/update_lib/deps.py:153–159  ·  view source on GitHub ↗

Count RustPython TODO markers in a file or directory of .py files.

(path: pathlib.Path)

Source from the content-addressed store, hash-verified

151
152
153def count_todo_in_path(path: pathlib.Path) -> int:
154 """Count RustPython TODO markers in a file or directory of .py files."""
155 if path.is_file():
156 content = safe_read_text(path)
157 return count_rustpython_todo(content) if content else 0
158
159 return sum(count_rustpython_todo(content) for _, content in read_python_files(path))
160
161
162# === Test utilities ===

Callers 1

count_test_todosFunction · 0.85

Calls 5

safe_read_textFunction · 0.90
read_python_filesFunction · 0.90
count_rustpython_todoFunction · 0.85
sumFunction · 0.50
is_fileMethod · 0.45

Tested by

no test coverage detected