Skip to content

Commit

Permalink
ci: [pre-commit.ci] pre-commit autoupdate (#1202)
Browse files Browse the repository at this point in the history
<!--pre-commit.ci start-->
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.6.7 →
v0.6.8](astral-sh/ruff-pre-commit@v0.6.7...v0.6.8)
<!--pre-commit.ci end-->

<!-- Generated by sourcery-ai[bot]: start summary -->

## Summary by Sourcery

Update the ruff-pre-commit hook to the latest version in the pre-commit
configuration file.

CI:
- Update the ruff-pre-commit hook from version v0.6.7 to v0.6.8 in the
pre-commit configuration.

<!-- Generated by sourcery-ai[bot]: end summary -->

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Grzegorz Bokota <[email protected]>
  • Loading branch information
pre-commit-ci[bot] and Czaki authored Oct 1, 2024
1 parent b0dd5ce commit afad344
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ repos:
- id: debug-statements
- id: mixed-line-ending
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.7
rev: v0.6.8
hooks:
- id: ruff
- repo: https://github.com/pre-commit/pygrep-hooks
Expand Down
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 afad344

Please sign in to comment.