Skip to content

Commit

Permalink
ENH: Remove unused imports contained within try/expect blocks
Browse files Browse the repository at this point in the history
Remove unused imports contained within `try`/`expect` blocks.
  • Loading branch information
jhlegarreta committed Oct 21, 2023
1 parent 3bd5f04 commit c77eb85
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 43 deletions.
8 changes: 0 additions & 8 deletions bin/wm_cluster_remove_outliers.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,6 @@

import whitematteranalysis as wma

try:
from joblib import Parallel, delayed
USE_PARALLEL = 1
except ImportError:
USE_PARALLEL = 0
print(f"<{os.path.basename(__file__)}> Failed to import joblib, cannot multiprocess.")
print(f"<{os.path.basename(__file__)}> Please install joblib for this functionality.")


def _build_arg_parser():

Expand Down
8 changes: 0 additions & 8 deletions whitematteranalysis/register_two_subjects.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,6 @@ class RegisterTractography
import numpy
import vtk

try:
from joblib import Parallel, delayed
USE_PARALLEL = 1
except ImportError:
USE_PARALLEL = 0
print(f"<{os.path.basename(__file__)}> Failed to import joblib, cannot multiprocess.")
print(f"<{os.path.basename(__file__)}> Please install joblib for this functionality.")

import whitematteranalysis as wma


Expand Down
8 changes: 0 additions & 8 deletions whitematteranalysis/register_two_subjects_nonrigid.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,6 @@ class RegisterTractographyNonrigid
import numpy
import vtk

try:
from joblib import Parallel, delayed
USE_PARALLEL = 1
except ImportError:
USE_PARALLEL = 0
print(f"<{os.path.basename(__file__)}> Failed to import joblib, cannot multiprocess.")
print(f"<{os.path.basename(__file__)}> Please install joblib for this functionality.")

import whitematteranalysis as wma


Expand Down
12 changes: 2 additions & 10 deletions whitematteranalysis/register_two_subjects_nonrigid_bsplines.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,11 @@ class RegisterTractographyNonrigid
import vtk
import vtk.util.numpy_support

import whitematteranalysis as wma

# debug only
#import resource

try:
from joblib import Parallel, delayed
USE_PARALLEL = 1
except ImportError:
USE_PARALLEL = 0
print(f"<{os.path.basename(__file__)}> Failed to import joblib, cannot multiprocess.")
print(f"<{os.path.basename(__file__)}> Please install joblib for this functionality.")

import whitematteranalysis as wma


class RegisterTractographyNonrigid(wma.register_two_subjects.RegisterTractography):

Expand Down
9 changes: 0 additions & 9 deletions whitematteranalysis/relative_distance.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,6 @@ class RelativeDistanceModel
import numpy
import vtk

try:
from joblib import Parallel, delayed
USE_PARALLEL = 1
except ImportError:
USE_PARALLEL = 0
print(f"<{os.path.basename(__file__)}> Failed to import joblib, cannot multiprocess.")
print(f"<{os.path.basename(__file__)}> Please install joblib for this functionality.")


import whitematteranalysis.fibers
import whitematteranalysis.similarity

Expand Down

0 comments on commit c77eb85

Please sign in to comment.