Skip to content

Commit

Permalink
fix mypy errors
Browse files Browse the repository at this point in the history
  • Loading branch information
AkshitaB committed Sep 18, 2023
1 parent 6563ac7 commit 1449534
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tango/common/file_lock.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ def acquire( # type: ignore[override]
if err.errno not in (1, 13, 30):
raise

if os.path.isfile(self._lock_file) and self._read_only_ok:
if os.path.isfile(self._lock_file) and self._read_only_ok: # type: ignore
warnings.warn(
f"Lacking permissions required to obtain lock '{self._lock_file}'. "
f"Lacking permissions required to obtain lock '{self._lock_file}'. " # type: ignore
"Race conditions are possible if other processes are writing to the same resource.",
UserWarning,
)
Expand All @@ -62,7 +62,7 @@ def acquire_with_updates(self, desc: Optional[str] = None) -> AcquireReturnProxy
from .tqdm import Tqdm

if desc is None:
desc = f"acquiring lock at {self._lock_file}"
desc = f"acquiring lock at {self._lock_file}" # type: ignore

progress = Tqdm.tqdm(desc=desc, bar_format="{desc} [{elapsed}]")
while True:
Expand Down

0 comments on commit 1449534

Please sign in to comment.