Skip to content

Commit

Permalink
[Templates/VUnit] Adjust to black changes
Browse files Browse the repository at this point in the history
  • Loading branch information
umarcor authored and olofk committed Nov 5, 2021
1 parent 4a3f3e8 commit aca7920
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions edalize/templates/vunit/run.py.j2
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
# Auto generated by Edalize


def load_module_from_file(name, python_file):
import importlib.util

spec = importlib.util.spec_from_file_location(name, python_file)
module = importlib.util.module_from_spec(spec)
spec.loader.exec_module(module)
return module

def load_runner_hooks(python_file = r'{{ vunit_runner_path }}'):

def load_runner_hooks(python_file=r"{{ vunit_runner_path }}"):
if len(python_file) > 0:
return load_module_from_file('vunit_runner_hooks', python_file)
return load_module_from_file("vunit_runner_hooks", python_file)
else:
return __import__('edalize.vunit_hooks', fromlist=['vunit_hooks'])
return __import__("edalize.vunit_hooks", fromlist=["vunit_hooks"])


runner = load_runner_hooks().VUnitRunner()

Expand Down

0 comments on commit aca7920

Please sign in to comment.