Count RustPython TODO markers in a file or directory of .py files.
(path: pathlib.Path)
| 151 | |
| 152 | |
| 153 | def 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 === |
no test coverage detected