Check if Python files have changed since the last successful lint run. Uses zccache-fingerprint for blake3-based change detection. Returns: True if files changed and pyright should run False if no changes detected and pyright can be skipped
()
| 38 | |
| 39 | |
| 40 | def check_python_files_changed() -> bool: |
| 41 | """ |
| 42 | Check if Python files have changed since the last successful lint run. |
| 43 | |
| 44 | Uses zccache-fingerprint for blake3-based change detection. |
| 45 | |
| 46 | Returns: |
| 47 | True if files changed and pyright should run |
| 48 | False if no changes detected and pyright can be skipped |
| 49 | """ |
| 50 | cache = _get_python_lint_cache() |
| 51 | needs_update = cache.check_needs_update( |
| 52 | include=_PYTHON_LINT_INCLUDE, |
| 53 | exclude=_PYTHON_LINT_EXCLUDE, |
| 54 | ) |
| 55 | |
| 56 | if needs_update: |
| 57 | print_cache_miss("Python files changed - running pyright") |
| 58 | return True |
| 59 | else: |
| 60 | print_cache_hit("No Python changes detected - skipping pyright") |
| 61 | return False |
| 62 | |
| 63 | |
| 64 | def mark_python_lint_success() -> None: |
no test coverage detected