Skip to content

Commit

Permalink
STYLE: Do not allow running unintended modules as scripts
Browse files Browse the repository at this point in the history
Do not allow running as scripts modules that are not intended for that:
remove the `if __name__ == "__main__": pass` statements.
  • Loading branch information
jhlegarreta committed May 19, 2024
1 parent 2aad9c6 commit 802b9e7
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 12 deletions.
4 changes: 0 additions & 4 deletions dipy/io/dpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,3 @@ def read_tracks(self):

def close(self):
self.f.close()


if __name__ == "__main__":
pass
4 changes: 0 additions & 4 deletions dipy/reconst/dsi.py
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,3 @@ def LR_deconv(prop, psf, numit=5, acc_factor=1):
# Enforce positivity
prop_deconv = np.clip(prop_deconv, 0, np.inf)
return prop_deconv / prop_deconv.sum()


if __name__ == "__main__":
pass
4 changes: 0 additions & 4 deletions dipy/tracking/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,3 @@ def midpoint2point(xyz, p):
"""
mid = midpoint(xyz)
return np.sqrt(np.sum((xyz - mid) ** 2))


if __name__ == "__main__":
pass

0 comments on commit 802b9e7

Please sign in to comment.