Don't try to even track not files

This commit is contained in:
Trenton H
2026-01-11 14:49:39 -08:00
parent 43cf844b76
commit d45826eaa2
2 changed files with 2 additions and 16 deletions

View File

@@ -182,10 +182,6 @@ class FileStabilityTracker:
"""Check if there are files waiting for stability check."""
return len(self._tracked) > 0
def clear(self) -> None:
"""Clear all tracked files."""
self._tracked.clear()
@property
def pending_count(self) -> int:
"""Number of files being tracked."""
@@ -540,6 +536,8 @@ class Command(BaseCommand):
# Process each change
for change_type, path in changes:
path = Path(path).resolve()
if not path.is_file():
continue
logger.debug(f"Event: {change_type.name} for {path}")
tracker.track(path, change_type)

View File

@@ -278,18 +278,6 @@ class TestFileStabilityTracker:
assert len(stable) == 1
assert stable[0] == file2
def test_clear(
self,
stability_tracker: FileStabilityTracker,
temp_file: Path,
) -> None:
"""Test clear removes all tracked files."""
stability_tracker.track(temp_file, Change.added)
assert stability_tracker.pending_count == 1
stability_tracker.clear()
assert stability_tracker.pending_count == 0
assert stability_tracker.has_pending_files() is False
def test_track_resolves_path(
self,
stability_tracker: FileStabilityTracker,