Skip to content

Commit

Permalink
Merge pull request #373 from ocefpaf/fix_context_loader
Browse files Browse the repository at this point in the history
Fix context loader
  • Loading branch information
ocefpaf authored Nov 5, 2024
2 parents 8a1d805 + 2ea9f3a commit 21add26
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ repos:
files: requirements-dev.txt

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.11.2
rev: v1.13.0
hooks:
- id: mypy
exclude: docs/source/conf.py
Expand Down Expand Up @@ -50,7 +50,7 @@ repos:
- id: add-trailing-comma

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.9
rev: v0.7.2
hooks:
- id: ruff
args: ["--fix", "--show-fixes"]
Expand All @@ -73,7 +73,7 @@ repos:
- id: nb-strip-paths

- repo: https://github.com/tox-dev/pyproject-fmt
rev: 2.2.4
rev: v2.5.0
hooks:
- id: pyproject-fmt

Expand Down
10 changes: 5 additions & 5 deletions erddapy/core/netcdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ def _tempnc(data: BinaryIO) -> Generator[str, None, None]:

tmp = None
try:
tmp = NamedTemporaryFile(
with NamedTemporaryFile(
suffix=".nc",
prefix="erddapy_",
delete=delete,
)
tmp.write(data.read())
tmp.flush()
yield tmp.name
) as tmp:
tmp.write(data.read())
tmp.flush()
yield tmp.name
finally:
if tmp is not None:
tmp.close()
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
dynamic = [
"dependencies",
Expand Down

0 comments on commit 21add26

Please sign in to comment.