Skip to content

Commit f9ec9cd

Browse files
committed
drop ContextDecorator as a parent to GlobalPatch
leftover from idea to use GlobalPatch as parent to mkl_fft context manager
1 parent 14d3705 commit f9ec9cd

1 file changed

Lines changed: 1 addition & 9 deletions

File tree

mkl_fft/_patch_numpy.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
import mkl_fft.interfaces.numpy_fft as _nfft
3535

3636

37-
class _GlobalPatch(ContextDecorator):
37+
class _GlobalPatch:
3838
def __init__(self):
3939
self._lock = Lock()
4040
self._patch_count = 0
@@ -105,14 +105,6 @@ def is_patched(self):
105105
with self._lock:
106106
return self._patch_count > 0
107107

108-
def __enter__(self):
109-
self.do_patch()
110-
return self
111-
112-
def __exit__(self, *exc):
113-
self.do_restore()
114-
return False
115-
116108

117109
_patch = _GlobalPatch()
118110

0 commit comments

Comments
 (0)