Skip to content

Commit

Permalink
style (#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
soldni authored Apr 3, 2023
1 parent e23474e commit 5cf01e6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ requires = [

[project.optional-dependencies]
dev = [
"springs>=1.9.1",
"black[jupyter]>=21.12b0",
"isort>=5.8.0",
"mypy>=0.971",
Expand Down
9 changes: 2 additions & 7 deletions src/smashed/utils/io_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,10 +262,7 @@ def open_file_for_read(
assert client is not None, "Could not get S3 client"

logger.info(f"Downloading {path} to a temporary file")
with NamedTemporaryFile(
delete=False,
dir=get_temp_dir(temp_dir)
) as f:
with NamedTemporaryFile(delete=False, dir=get_temp_dir(temp_dir)) as f:
client.download_fileobj(path.bucket, path.key.lstrip("/"), f)
path = MultiPath.parse(f.name)
remove = True
Expand Down Expand Up @@ -328,9 +325,7 @@ def open_file_for_write(
yield f
else:
with NamedTemporaryFile(
delete=False,
mode=mode,
dir=get_temp_dir(temp_dir)
delete=False, mode=mode, dir=get_temp_dir(temp_dir)
) as f:
yield f
local = MultiPath.parse(f.name)
Expand Down

0 comments on commit 5cf01e6

Please sign in to comment.