Skip to content

Commit 010635e

Browse files
STY: Apply ruff/pycodestyle rule PLW1508
PLW1508 Invalid type for environment variable default; expected `str` or `None`
1 parent 7b548cc commit 010635e

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

niworkflows/interfaces/tests/test_plotting.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434

3535
def test_cifti_carpetplot():
3636
"""Exercise extraction of timeseries from CIFTI2."""
37-
save_artifacts = os.getenv('SAVE_CIRCLE_ARTIFACTS', False)
37+
save_artifacts = os.getenv('SAVE_CIRCLE_ARTIFACTS')
3838

3939
cifti_file = load_test_data(
4040
'sub-01_task-mixedgamblestask_run-02_space-fsLR_den-91k_bold.dtseries.nii'
@@ -54,7 +54,7 @@ def test_cifti_carpetplot():
5454

5555
def test_nifti_carpetplot():
5656
"""Exercise extraction of timeseries from CIFTI2."""
57-
save_artifacts = os.getenv('SAVE_CIRCLE_ARTIFACTS', False)
57+
save_artifacts = os.getenv('SAVE_CIRCLE_ARTIFACTS')
5858

5959
nifti_file = load_test_data('sub-ds205s03_task-functionallocalizer_run-01_bold_volreg.nii.gz')
6060
seg_file = load_test_data('sub-ds205s03_task-functionallocalizer_run-01_bold_parc.nii.gz')

niworkflows/tests/test_confounds.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
def _smoke_test_report(report_interface, artifact_name):
3838
out_report = report_interface.run().outputs.out_file
3939

40-
save_artifacts = os.getenv('SAVE_CIRCLE_ARTIFACTS', False)
40+
save_artifacts = os.getenv('SAVE_CIRCLE_ARTIFACTS')
4141
if save_artifacts:
4242
copy(out_report, os.path.join(save_artifacts, artifact_name))
4343
assert os.path.isfile(out_report), f'Report "{out_report}" does not exist'

niworkflows/tests/test_registration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def _smoke_test_report(report_interface, artifact_name):
4747
res = pe.Node(report_interface, name='smoke_test', base_dir=tmpdir).run()
4848
out_report = res.outputs.out_report
4949

50-
save_artifacts = os.getenv('SAVE_CIRCLE_ARTIFACTS', False)
50+
save_artifacts = os.getenv('SAVE_CIRCLE_ARTIFACTS')
5151
if save_artifacts:
5252
copy(out_report, os.path.join(save_artifacts, artifact_name))
5353
assert os.path.isfile(out_report), 'Report does not exist'

niworkflows/tests/test_segmentation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def _smoke_test_report(report_interface, artifact_name):
4646
res = pe.Node(report_interface, name='smoke_test', base_dir=tmpdir).run()
4747
out_report = res.outputs.out_report
4848

49-
save_artifacts = os.getenv('SAVE_CIRCLE_ARTIFACTS', False)
49+
save_artifacts = os.getenv('SAVE_CIRCLE_ARTIFACTS')
5050
if save_artifacts:
5151
copy(out_report, os.path.join(save_artifacts, artifact_name))
5252
assert os.path.isfile(out_report), f'Report "{out_report}" does not exist'

niworkflows/tests/test_viz.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
@pytest.mark.parametrize('sorting', [None, 'ward', 'linkage'])
4444
def test_carpetplot(tr, sorting):
4545
"""Write a carpetplot"""
46-
save_artifacts = os.getenv('SAVE_CIRCLE_ARTIFACTS', False)
46+
save_artifacts = os.getenv('SAVE_CIRCLE_ARTIFACTS')
4747

4848
rng = np.random.default_rng(2010)
4949

@@ -137,7 +137,7 @@ def test_carpetplot(tr, sorting):
137137
)
138138
def test_fmriplot(input_files):
139139
"""Exercise the fMRIPlot class."""
140-
save_artifacts = os.getenv('SAVE_CIRCLE_ARTIFACTS', False)
140+
save_artifacts = os.getenv('SAVE_CIRCLE_ARTIFACTS')
141141
rng = np.random.default_rng(2010)
142142

143143
in_file = os.path.join(datadir, input_files[0])

0 commit comments

Comments
 (0)