Skip to content

Commit

Permalink
fix ruff warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Czaki committed Oct 1, 2024
1 parent 4e9b34e commit 2bb5bbf
Showing 1 changed file with 19 additions and 16 deletions.
35 changes: 19 additions & 16 deletions package/PartSegImage/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,22 +122,25 @@ def _fun(*args, **kwargs):
stacklevel=2,
)

for name, arg in zip(
(
"spacing",
"file_path",
"mask",
"default_coloring",
"ranges",
"axes_order",
"shift",
"name",
"metadata_dict",
),
args[2:],
# start from 2 because first two arguments are self and data
):
kwargs[name] = arg
new_kwargs = dict(
zip(
(
"spacing",
"file_path",
"mask",
"default_coloring",
"ranges",
"axes_order",
"shift",
"name",
"metadata_dict",
),
args[2:],
# start from 2 because first two arguments are self and data
)
)

kwargs.update(new_kwargs)

return fun(*args[:2], **kwargs)

Expand Down

0 comments on commit 2bb5bbf

Please sign in to comment.