Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Nov 8, 2024
1 parent 7f76a0c commit 3eb24e3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
7 changes: 4 additions & 3 deletions src/dolphin/unwrap/_tophu.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,10 @@ def _get_cb_and_nodata(unwrap_method, unwrap_callback, nodata):
# Fill in the nan pixels with the nearest ambiguities
from ._post_process import interpolate_masked_gaps

with rio.open(unw_filename, mode="r+") as u_src, rio.open(
igram_rb.filepath
) as i_src:
with (
rio.open(unw_filename, mode="r+") as u_src,
rio.open(igram_rb.filepath) as i_src,
):
unw = u_src.read(1)
ifg = i_src.read(1)
# nodata_mask = i_src.read_masks(1) != 0
Expand Down
21 changes: 12 additions & 9 deletions tests/test_io_readers.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,18 @@ def binary_file_list(tmp_path_factory, slc_stack):
for i, slc in enumerate(slc_stack):
f = tmp_path / f"test_{i}.bin"
# Ignore warning
with pytest.warns(NotGeoreferencedWarning), rio.open(
f,
"w",
driver="ENVI",
width=shape[1],
height=shape[0],
count=1,
dtype=dtype,
) as dst:
with (
pytest.warns(NotGeoreferencedWarning),
rio.open(
f,
"w",
driver="ENVI",
width=shape[1],
height=shape[0],
count=1,
dtype=dtype,
) as dst,
):
dst.write(slc, 1)
files.append(f)

Expand Down

0 comments on commit 3eb24e3

Please sign in to comment.