Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix B026 unrecommanded star-arg unpacking after a keyword argument #7262

Merged
merged 1 commit into from
Nov 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion monai/data/image_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -1300,7 +1300,7 @@ def read(self, data: Sequence[PathLike] | PathLike, **kwargs) -> Sequence[Any] |
kwargs_ = self.kwargs.copy()
kwargs_.update(kwargs)
for name in filenames:
nrrd_image = NrrdImage(*nrrd.read(name, index_order=self.index_order, *kwargs_))
nrrd_image = NrrdImage(*nrrd.read(name, index_order=self.index_order, **kwargs_))
img_.append(nrrd_image)
return img_ if len(filenames) > 1 else img_[0]

Expand Down
2 changes: 1 addition & 1 deletion monai/inferers/inferer.py
Original file line number Diff line number Diff line change
Expand Up @@ -584,10 +584,10 @@ def __call__(
return super().__call__(
inputs,
network,
*args,
device=inputs.device if gpu_stitching else torch.device("cpu"),
buffer_steps=buffer_steps if buffered_stitching else None,
buffer_dim=buffer_dim,
*args,
**kwargs,
)
except RuntimeError as e:
Expand Down
2 changes: 1 addition & 1 deletion tests/test_video_datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def get_video_source(self):
return self.video_source

def get_ds(self, *args, **kwargs) -> VideoDataset:
return self.ds(video_source=self.get_video_source(), transform=TRANSFORMS, *args, **kwargs) # type: ignore
return self.ds(*args, video_source=self.get_video_source(), transform=TRANSFORMS, **kwargs) # type: ignore

@unittest.skipIf(has_cv2, "Only tested when OpenCV not installed.")
def test_no_opencv_raises(self):
Expand Down
Loading