8000 STY: Apply ruff/flake8-comprehensions rules (C4) by DimitriPapadopoulos · Pull Request #3680 · nipy/nipype · GitHub
[go: up one dir, main page]

Skip to content

STY: Apply ruff/flake8-comprehensions rules (C4) #3680

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

Merged
merged 8 commits into from
Oct 6, 2024
Prev Previous commit
Next Next commit
STY: Apply ruff/flake8-comprehensions rule C409
C409 Unnecessary `list` literal passed to `tuple()` (rewrite as a `tuple` literal)
  • Loading branch information
DimitriPapadopoulos committed Oct 6, 2024
commit f9ac9d9e0d2f0a64f11ba3771aee82ef28c51bbc
4 changes: 2 additions & 2 deletions nipype/interfaces/cmtk/cmtk.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ def cmat(
axis=1,
)
)
G.nodes[int(u)]["dn_position"] = tuple([xyz[0], xyz[2], -xyz[1]])
G.nodes[int(u)]["dn_position"] = (xyz[0], xyz[2], -xyz[1])

if intersections:
iflogger.info("Filtering tractography from intersections")
Expand Down Expand Up @@ -1070,7 +1070,7 @@ def create_nodes(roi_file, resolution_network_file, out_filename):
np.where(np.flipud(roiData) == int(d["dn_correspondence_id"])), axis=1
)
)
G.nodes[int(u)]["dn_position"] = tuple([xyz[0], xyz[2], -xyz[1]])
G.nodes[int(u)]["dn_position"] = (xyz[0], xyz[2], -xyz[1])
with open(out_filename, 'wb') as f:
pickle.dump(G, f, pickle.HIGHEST_PROTOCOL)
return out_filename
Expand Down
0