Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ extend-select = [
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"FLY", # flynt
"G", # flake8-logging-format
"I", # isort
"ISC", # flake8-implicit-str-concat
"PGH", # pygrep-hooks
Expand Down
2 changes: 1 addition & 1 deletion src/zarr/core/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def sync(

finished, unfinished = wait([future], return_when=asyncio.ALL_COMPLETED, timeout=timeout)
if len(unfinished) > 0:
raise TimeoutError(f"Coroutine {coro} failed to finish in within {timeout}s")
raise TimeoutError(f"Coroutine {coro} failed to finish in within {timeout} s")
assert len(finished) == 1
return_result = next(iter(finished)).result()

Expand Down
6 changes: 3 additions & 3 deletions src/zarr/storage/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,15 @@ def log(self, hint: Any = "") -> Generator[None, None, None]:
method = inspect.stack()[2].function
op = f"{type(self._store).__name__}.{method}"
if hint:
op += f"({hint})"
self.logger.info(f"Calling {op}")
op = f"{op}({hint})"
self.logger.info("Calling %s", op)
start_time = time.time()
try:
self.counter[method] += 1
yield
finally:
end_time = time.time()
self.logger.info(f"Finished {op} [{end_time - start_time:.2f}s]")
self.logger.info("Finished %s [%.2f s]", op, end_time - start_time)

@property
def supports_writes(self) -> bool:
Expand Down