Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

STY: Enforce ruff/flake8-pie rules (PIE) #1354

Merged
merged 3 commits into from
Sep 22, 2024
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 nibabel/ecat.py
Original file line number Diff line number Diff line change
Expand Up @@ -957,7 +957,7 @@ def to_file_map(self, file_map=None):
hdr.write_to(hdrf)

# Write every frames
for index in range(0, self.header['num_frames']):
for index in range(self.header['num_frames']):
# Move to subheader offset
frame_offset = subheaders._get_frame_offset(index) - 512
imgf.seek(frame_offset)
Expand Down
4 changes: 2 additions & 2 deletions nibabel/streamlines/tests/test_tractogram.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ def make_fake_tractogram(
):
"""Make multiple streamlines according to provided requirements."""
all_streamlines = []
all_data_per_point = defaultdict(lambda: [])
all_data_per_streamline = defaultdict(lambda: [])
all_data_per_point = defaultdict(list)
all_data_per_streamline = defaultdict(list)
for nb_points in list_nb_points:
data = make_fake_streamline(
nb_points, data_per_point_shapes, data_for_streamline_shapes, rng
Expand Down
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ select = [
"C4",
"F",
"I",
"PIE",
"PLE",
"Q",
"RSE",
Expand All @@ -139,6 +140,7 @@ ignore = [
"C401",
"C408",
"C416",
"PIE790",
# https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
"W191",
"E111",
Expand Down
Loading