Merge pull request #416 from dee-me-tree-or-love/fix-small-styling-fixes

fix(small-black-format-fixes): small styling fixes
This commit is contained in:
Dmitrii Orlov 2022-02-21 09:20:27 +01:00 committed by GitHub
commit e608e8645f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -204,7 +204,7 @@ def write_file(fh: t.BinaryIO, destination: PathLike) -> None:
"""write a byte stream into a destination file. Writes are chunked to reduce
the memory footprint
"""
chunk_size = 2 ** 20 # 1 MB
chunk_size = 2**20 # 1 MB
offset = fh.tell()
try:
with open(destination, "wb") as dest:
@ -259,7 +259,7 @@ def digest_file(file_path: PathLike, hash_algo: str) -> str:
From http://stackoverflow.com/a/21565932/548792
"""
blocksize = 2 ** 16
blocksize = 2**16
digester = hashlib.new(hash_algo)
with open(file_path, "rb") as f:
for block in iter(lambda: f.read(blocksize), b""):

View File

@ -57,7 +57,7 @@ def run_server(root, authed=False, other_cli=""):
f"run -vvv --overwrite -i 127.0.0.1 "
f"-p {port} {pswd_opts} {other_cli} {root}"
)
proc = Popen(cmd.split(), bufsize=2 ** 16)
proc = Popen(cmd.split(), bufsize=2**16)
srv = Srv(port, root)
try:
wait_until_ready(srv)