Skip to content

Commit 24d6360

Browse files
STY: Apply ruff/flake8-simplify rule SIM118
SIM118 Use `key in dict` instead of `key in dict.keys()`
1 parent 0f24374 commit 24d6360

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

niworkflows/interfaces/bids.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -216,9 +216,7 @@ def _run_interface(self, runtime):
216216
except ValueError:
217217
pass
218218
params = parse_file_entities(in_file)
219-
self._results = {
220-
key: params.get(key, Undefined) for key in _BIDSInfoOutputSpec().get().keys()
221-
}
219+
self._results = {key: params.get(key, Undefined) for key in _BIDSInfoOutputSpec().get()}
222220
return runtime
223221

224222

niworkflows/interfaces/surf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ def _outputs(self):
182182
trait_change_notify=False,
183183
**{
184184
entity: Undefined
185-
for entity in self._pattern.groupindex.keys()
185+
for entity in self._pattern.groupindex
186186
if entity not in self._excluded
187187
},
188188
)

0 commit comments

Comments
 (0)