Skip to content

Commit

Permalink
Attempting isort fix, version 6.0 doesn't agree with black about form…
Browse files Browse the repository at this point in the history
…at choices

Signed-off-by: Eric Kerfoot <[email protected]>
  • Loading branch information
ericspod committed Jan 29, 2025
1 parent 4b5759c commit a1d9ac5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pep8-naming
pycodestyle
pyflakes
black>=22.12
isort>=5.1
isort>=5.1, <6.0
ruff
pytype>=2020.6.1; platform_system != "Windows"
types-setuptools
Expand Down
2 changes: 1 addition & 1 deletion tests/test_meta_tensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ def test_pickling(self):
with tempfile.TemporaryDirectory() as tmp_dir:
fname = os.path.join(tmp_dir, "im.pt")
torch.save(m, fname)
m2 = torch.load(fname, weights_only=False)
m2 = torch.load(fname)
if not isinstance(m2, MetaTensor) and not pytorch_after(1, 8, 1):
warnings.warn("Old version of pytorch. pickling converts `MetaTensor` to `torch.Tensor`.")
m = m.as_tensor()
Expand Down
4 changes: 2 additions & 2 deletions tests/test_zarr_avg_merger.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@

# test for LZ4 compressor
TEST_CASE_13_COMPRESSOR_LZ4 = [
dict(merged_shape=TENSOR_4x4.shape, compressor=zarr.codecs.BloscCodec),
dict(merged_shape=TENSOR_4x4.shape, compressor="LZ4"),
[
(TENSOR_4x4[..., :2, :2], (0, 0)),
(TENSOR_4x4[..., :2, 2:], (0, 2)),
Expand Down Expand Up @@ -291,7 +291,7 @@ def test_zarr_avg_merger_patches(self, arguments, patch_locations, expected):
codec_reg = numcodecs.registry.codec_registry
if "compressor" in arguments:
if arguments["compressor"] != "default":
arguments["compressor"] = arguments["compressor"]
arguments["compressor"] = codec_reg[arguments["compressor"].lower()]()
if "value_compressor" in arguments:
if arguments["value_compressor"] != "default":
arguments["value_compressor"] = codec_reg[arguments["value_compressor"].lower()]()
Expand Down

0 comments on commit a1d9ac5

Please sign in to comment.