Skip to content

Commit 425bb0a

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent f57d2c6 commit 425bb0a

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

sdcflows/tests/test_fieldmaps.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,8 @@ def test_FieldmapEstimation(dsA_dir, inputfiles, method, nsources):
120120
fm.FieldmapEstimation(sources, bids_id=fe.bids_id)
121121

122122
# Ensure we can't instantiate one more estimation with same sources
123-
with pytest.warns(UserWarning, match=r"is already .* in mapping"):
124-
fm.FieldmapEstimation(sources, bids_id=f"my{fe.bids_id}")
123+
with pytest.warns(UserWarning, match=r'is already .* in mapping'):
124+
fm.FieldmapEstimation(sources, bids_id=f'my{fe.bids_id}')
125125

126126
# Exercise workflow creation
127127
wf = fe.get_workflow()

sdcflows/utils/bimap.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,10 @@ def __setitem__(self, key, value):
145145
if self.__contains__(key):
146146
raise KeyError(f"'{key}' is already {'a value' * (key in self._inverse)} in mapping")
147147
if self.__contains__(value):
148-
warnings.warn( f"'{value}' is already {'a key' * (value not in self._inverse)} in mapping", UserWarning )
148+
warnings.warn(
149+
f"'{value}' is already {'a key' * (value not in self._inverse)} in mapping",
150+
UserWarning,
151+
)
149152

150153
super().__setitem__(key, value)
151154
self._inverse[value] = key

0 commit comments

Comments
 (0)