Skip to content

Commit 286b49d

Browse files
author
autoruff
committed
fixup: improve-cache-writing Python code reformatted using Ruff
1 parent 9ac5d15 commit 286b49d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

plugwise_usb/helpers/cache.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ def _get_writable_os_dir(self) -> str:
8080
)
8181
return os_path_join(os_path_expand_user("~"), CACHE_DIR)
8282

83-
8483
async def write_cache(self, data: dict[str, str], rewrite: bool = False) -> None:
8584
"""Save information to cache file atomically using aiofiles + temp file."""
8685
if not self._initialized:
@@ -110,7 +109,9 @@ async def write_cache(self, data: dict[str, str], rewrite: bool = False) -> None
110109

111110
# Atomic write using aiofiles with temporary file
112111
cache_file_path = Path(self._cache_file)
113-
temp_path = cache_file_path.with_name(f".{cache_file_path.name}.tmp.{os.getpid()}")
112+
temp_path = cache_file_path.with_name(
113+
f".{cache_file_path.name}.tmp.{os.getpid()}"
114+
)
114115

115116
try:
116117
# Write to temporary file using aiofiles

0 commit comments

Comments
 (0)