fix: f-string unmatched [ (#104)
This commit is contained in:
parent
ba1c0f7b38
commit
e5593305d3
|
|
@ -64,22 +64,23 @@ def put_complete_file_contents(
|
||||||
result["bytes_written"] = len(complete_file_contents.encode(encoding))
|
result["bytes_written"] = len(complete_file_contents.encode(encoding))
|
||||||
|
|
||||||
elapsed = time.time() - start_time
|
elapsed = time.time() - start_time
|
||||||
|
bytes_written = result["bytes_written"]
|
||||||
result["elapsed_time"] = elapsed
|
result["elapsed_time"] = elapsed
|
||||||
result["success"] = True
|
result["success"] = True
|
||||||
result["filepath"] = filepath
|
result["filepath"] = filepath
|
||||||
result["message"] = (
|
result["message"] = (
|
||||||
f"Successfully {'initialized empty file' if not complete_file_contents else f'wrote {result['bytes_written']} bytes'} "
|
f"Successfully {'initialized empty file' if not complete_file_contents else f'wrote {bytes_written} bytes'} "
|
||||||
f"at {filepath} in {result['elapsed_time']:.3f}s"
|
f"at {filepath} in {result['elapsed_time']:.3f}s"
|
||||||
)
|
)
|
||||||
|
|
||||||
logging.debug(
|
logging.debug(
|
||||||
f"File write complete: {result['bytes_written']} bytes in {elapsed:.2f}s"
|
f"File write complete: {bytes_written} bytes in {elapsed:.2f}s"
|
||||||
)
|
)
|
||||||
|
|
||||||
if verbose:
|
if verbose:
|
||||||
console.print(
|
console.print(
|
||||||
Panel(
|
Panel(
|
||||||
f"{'Initialized empty file' if not complete_file_contents else f'Wrote {result['bytes_written']} bytes'} at {filepath} in {elapsed:.2f}s",
|
f"{'Initialized empty file' if not complete_file_contents else f'Wrote {bytes_written} bytes'} at {filepath} in {elapsed:.2f}s",
|
||||||
title="💾 File Write",
|
title="💾 File Write",
|
||||||
border_style="bright_green",
|
border_style="bright_green",
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue