Import the shared atomic replace fallback into watch.py

watch.py writes graph.json via a plain Path.replace() at two call
sites instead of the shared os_replace_with_fallback helper that
export.py, cache.py, and install.py already route through. This adds
the import with no behavior change yet; both call sites are switched
over in the next two commits.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017qfdzgbA5KedGEjD1AayNh
(cherry picked from commit f3694aea49)
This commit is contained in:
ayushcodes10 authored and safishamsi committed 2026-09-14 18:52:05 +01:00
1 parent df9f37612f
commit a15e7bb4e2
1 file changed
+5 -1
+5 -1
View File
@@ -12,7 +12,11 @@ from pathlib import Path
from typing import Callable
# Single source of truth in graphify.paths (#1423); re-exported as _GRAPHIFY_OUT.
from graphify.paths import GRAPHIFY_OUT as _GRAPHIFY_OUT, is_absolute_any_platform
from graphify.paths import (
GRAPHIFY_OUT as _GRAPHIFY_OUT,
is_absolute_any_platform,
os_replace_with_fallback,
)
logger = logging.getLogger(__name__)
_PENDING_FILENAME = ".pending_changes"