Skip to content

Commit f6d1a76

Browse files
committed
Fix lazy underscore placeholders to prevent i18n shadowing
1 parent cb1fa76 commit f6d1a76

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/omnipkg/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
from .common_utils import print_header
3434
from .core import ConfigManager
3535
from .core import omnipkg as OmnipkgCore
36-
from .i18n import SUPPORTED_LANGUAGES, _
36+
from omnipkg.i18n import _
3737

3838
project_root = Path(__file__).resolve().parent.parent
3939
TESTS_DIR = Path(__file__).parent.parent / "tests"

src/omnipkg/isolation/worker_daemon.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def read_state(self) -> Tuple[int, int, int]:
103103

104104
def get_version(self) -> int:
105105
"""Get the current version number."""
106-
ver, _, _ = self.read_state()
106+
ver, unused, unused = self.read_state()
107107
return ver
108108

109109
def try_lock_and_validate(self, expected_version: int) -> bool:
@@ -115,7 +115,7 @@ def try_lock_and_validate(self, expected_version: int) -> bool:
115115
self._lock.acquire(timeout=0.01) # Non-blocking attempt
116116

117117
# Re-read state inside lock
118-
current_ver, _, is_locked = struct.unpack(self.STRUCT_FMT, self.shm.buf)
118+
current_ver, unused, is_locked = struct.unpack(self.STRUCT_FMT, self.shm.buf)
119119

120120
if is_locked or current_ver != expected_version:
121121
self._lock.release()

0 commit comments

Comments
 (0)