Skip to content

Commit 73ed096

Browse files
STY: Apply ruff/flake8-pie rule PIE808
PIE808 Unnecessary `start` argument in `range`
1 parent d6d726e commit 73ed096

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

niworkflows/interfaces/confounds.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ def _check_and_expand_derivative(expr, variables, data):
442442
6th only."""
443443
if re.search(r'^dd[0-9]+', expr):
444444
order = re.compile(r'^dd([0-9]+)').findall(expr)
445-
order = range(0, int(*order) + 1)
445+
order = range(int(*order) + 1)
446446
(variables, data) = temporal_derivatives(order, variables, data)
447447
elif re.search(r'^d[0-9]+[\-]?[0-9]*', expr):
448448
order = re.compile(r'^d([0-9]+[\-]?[0-9]*)').findall(expr)

niworkflows/viz/plots.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ def spikesplot(
414414
# Handle X axis
415415
last = ntsteps - 1
416416
ax.set_xlim(0, last)
417-
xticks = list(range(0, last)[::20]) + [last] if not hide_x else []
417+
xticks = list(range(last)[::20]) + [last] if not hide_x else []
418418
ax.set_xticks(xticks)
419419

420420
if not hide_x:
@@ -564,7 +564,7 @@ def confoundplot(
564564

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

570570
if not hide_x:

0 commit comments

Comments
 (0)