Skip to content

Commit 74a5309

Browse files
committed
restructure interfaces __init__ to avoid local variables and namespace pollution
1 parent 33d2698 commit 74a5309

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

mkl_fft/interfaces/__init__.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,17 @@
3030
try:
3131
import scipy
3232

33-
_has_scipy = True
33+
del scipy
3434
except ImportError:
35-
_has_scipy = False
36-
37-
if _has_scipy:
35+
pass
36+
else:
3837
try:
3938
import mkl
4039

41-
from . import scipy_fft
40+
del mkl
4241
except ImportError:
4342
pass
4443
else:
45-
__all__.append("scipy_fft")
44+
from . import scipy_fft
4645

47-
del _has_scipy
46+
__all__.append("scipy_fft")

0 commit comments

Comments
 (0)