Merge pull request #926 from PyPSA/efficient-helper-source-path
remove inefficient _helper.py file search
This commit is contained in:
commit
a13da7bab7
@ -4,11 +4,8 @@
|
|||||||
|
|
||||||
import os, sys, glob
|
import os, sys, glob
|
||||||
|
|
||||||
helper_source_path = [match for match in glob.glob("**/_helpers.py", recursive=True)]
|
path = workflow.source_path("../scripts/_helpers.py")
|
||||||
|
sys.path.insert(0, os.path.dirname(path))
|
||||||
for path in helper_source_path:
|
|
||||||
path = os.path.dirname(os.path.abspath(path))
|
|
||||||
sys.path.insert(0, os.path.abspath(path))
|
|
||||||
|
|
||||||
from _helpers import validate_checksum
|
from _helpers import validate_checksum
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user