Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion niworkflows/interfaces/confounds.py
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ def _check_and_expand_derivative(expr, variables, data):
6th only."""
if re.search(r'^dd[0-9]+', expr):
order = re.compile(r'^dd([0-9]+)').findall(expr)
order = range(0, int(*order) + 1)
order = range(int(*order) + 1)
(variables, data) = temporal_derivatives(order, variables, data)
elif re.search(r'^d[0-9]+[\-]?[0-9]*', expr):
order = re.compile(r'^d([0-9]+[\-]?[0-9]*)').findall(expr)
Expand Down
2 changes: 1 addition & 1 deletion niworkflows/interfaces/tests/test_bids.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ def test_DerivativesDataSink_build_path(
for out, exp in zip(output, expectation):
assert Path(out).relative_to(base_directory) == Path(base) / exp
# Regression - some images were given nan scale factors
if out.endswith('.nii') or out.endswith('.nii.gz'):
if out.endswith(('.nii', '.nii.gz')):
img = nb.load(out)
if isinstance(img, nb.Nifti1Image):
with nb.openers.ImageOpener(out) as fobj:
Expand Down
4 changes: 2 additions & 2 deletions niworkflows/viz/plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@
# Handle X axis
last = ntsteps - 1
ax.set_xlim(0, last)
xticks = list(range(0, last)[::20]) + [last] if not hide_x else []
xticks = list(range(last)[::20]) + [last] if not hide_x else []

Check warning on line 417 in niworkflows/viz/plots.py

View check run for this annotation

Codecov / codecov/patch

niworkflows/viz/plots.py#L417

Added line #L417 was not covered by tests
ax.set_xticks(xticks)

if not hide_x:
Expand Down Expand Up @@ -564,7 +564,7 @@

# Set 10 frame markers in X axis
interval = max((ntsteps // 10, ntsteps // 5, 1))
xticks = list(range(0, ntsteps)[::interval])
xticks = list(range(ntsteps)[::interval])
ax_ts.set_xticks(xticks)

if not hide_x:
Expand Down
Loading