Coverage for src / rhiza / commands / _sync_helpers.py: 100%

2 statements  

« prev     ^ index     » next       coverage.py v7.14.0, created at 2026-07-16 12:51 +0000

1"""Internal helpers for the ``sync`` command. 

2 

3This module exposes the private implementation functions used by 

4:mod:`rhiza.commands.sync`. Placing them here gives tests a stable import 

5path (``from rhiza.commands._sync_helpers import ...``) without coupling them 

6to the command module's public API. 

7 

8The lock-file persistence and orphan-cleanup helpers actually live in 

9:mod:`rhiza.models._git.lock_io` (the models layer drives them during the 

10merge); they are re-exported here so existing 

11``from rhiza.commands._sync_helpers import ...`` call sites keep working 

12without creating a ``models -> commands`` import cycle. 

13""" 

14 

15from rhiza.models._git.lock_io import ( 

16 _FCNTL_AVAILABLE, 

17 LOCK_FILE, 

18 _clean_orphaned_files, 

19 _delete_orphaned_file, 

20 _files_from_snapshot, 

21 _lock_content_unchanged, 

22 _read_previously_tracked_files, 

23 _warn_about_workflow_files, 

24 _write_lock, 

25) 

26 

27__all__ = [ 

28 "LOCK_FILE", 

29 "_FCNTL_AVAILABLE", 

30 "_clean_orphaned_files", 

31 "_delete_orphaned_file", 

32 "_files_from_snapshot", 

33 "_lock_content_unchanged", 

34 "_read_previously_tracked_files", 

35 "_warn_about_workflow_files", 

36 "_write_lock", 

37]