Skip to content

Commit 931b9b7

Browse files
committed
using lru_cache for all_interface
1 parent d6bd589 commit 931b9b7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tools/converter.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import inspect
1010
import click
1111
import warnings
12+
import functools
1213

1314
sys.path.append(str(Path(__file__).resolve().parent.parent / 'specs'))
1415
import callables
@@ -430,6 +431,7 @@ def create_pydra_spec(interface_name, module_name):
430431
raise Exception(f"the specification file doesn't exist for the module {module_name},"
431432
f"create the specification file in {spec_file.parent}")
432433

434+
@functools.lru_cache()
433435
def all_interfaces(module):
434436
nipype_module = getattr(fsl, module)
435437
all_specs = [el for el in dir(nipype_module) if "InputSpec" in el]

0 commit comments

Comments
 (0)