Skip to content

Commit 1df1f18

Browse files
authored
MAINT: Use f-strings in test_import_nesting.py (mne-tools#13551)
1 parent 1801e86 commit 1df1f18

3 files changed

Lines changed: 4 additions & 2 deletions

File tree

doc/changes/dev/13551.other.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Refactor f-strings in ``mne/tests/test_import_nesting.py``, by :newcontrib:`Shruti Bhale`.

doc/changes/names.inc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,7 @@
302302
.. _Sheraz Khan: https://github.com/SherazKhan
303303
.. _Shresth Keshari: https://github.com/shresth-keshari
304304
.. _Shristi Baral: https://github.com/shristibaral
305+
.. _Shruti Bhale: https://github.com/shruti423
305306
.. _Silvia Cotroneo: https://github.com/sfc-neuro
306307
.. _Simeon Wong: https://github.com/dtxe
307308
.. _Simon Kern: https://skjerns.de

mne/tests/test_import_nesting.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ def generic_visit(self, node):
242242
and sys.modules[x] is not None)
243243
bad = scipy_submodules - ok_scipy_submodules
244244
if len(bad) > 0:
245-
out |= {'scipy submodules: %s' % list(bad)}
245+
out |= {f'scipy submodules: {list(bad)}'}
246246
247247
# check sklearn and others
248248
for x in sys.modules.keys():
@@ -253,7 +253,7 @@ def generic_visit(self, node):
253253
x = '.'.join(x.split('.')[:2])
254254
out |= {x}
255255
if len(out) > 0:
256-
print('\\nFound un-nested import(s) for %s' % (sorted(out),), end='')
256+
print(f'\\nFound un-nested import(s) for {sorted(out)}', end='')
257257
exit(len(out))
258258
259259
# but this should still work

0 commit comments

Comments
 (0)