Skip to content

Commit

Permalink
STY: Apply ruff/flake8-simplify rule SIM401
Browse files Browse the repository at this point in the history
SIM401 Use `.get()` instead of an `if` block
  • Loading branch information
DimitriPapadopoulos committed Sep 22, 2024
1 parent 1523d04 commit 6542864
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nipype/interfaces/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -2942,7 +2942,7 @@ def __init__(self, infields=None, **kwargs):
undefined_traits = {}
for key in self._infields:
self.inputs.add_trait(key, traits.Any)
undefined_traits[key] = kwargs[key] if key in kwargs else Undefined
undefined_traits[key] = kwargs.get(key, Undefined)

Check warning on line 2945 in nipype/interfaces/io.py

View check run for this annotation

Codecov / codecov/patch

nipype/interfaces/io.py#L2945

Added line #L2945 was not covered by tests

self.inputs.trait_set(trait_change_notify=False, **undefined_traits)

Expand Down

0 comments on commit 6542864

Please sign in to comment.