Skip to content

Commit

Permalink
pylint
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew-S-Rosen committed Sep 4, 2023
1 parent f7e2e62 commit 5015207
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion monty/shutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def gzip_dir(path: str | Path, compresslevel: int = 6) -> None:
for root, _, files in os.walk(path):
for f in files:
full_f = Path(root, f).resolve()
if not Path(f).suffix.lower() == ".gz" and not full_f.is_dir():
if Path(f).suffix.lower() != ".gz" and not full_f.is_dir():
with open(full_f, "rb") as f_in, GzipFile(f"{full_f}.gz", "wb", compresslevel=compresslevel) as f_out:
shutil.copyfileobj(f_in, f_out)
shutil.copystat(full_f, f"{full_f}.gz")
Expand Down

0 comments on commit 5015207

Please sign in to comment.