From 6040827c1c4481c25e70fc853317e1452dc1294d Mon Sep 17 00:00:00 2001 From: stefandesouza Date: Sat, 16 Dec 2023 17:20:35 +0100 Subject: [PATCH] - --- kerncraft/kerncraft.py | 2 +- kerncraft/machinemodel.py | 2 +- tests/test_kernel.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/kerncraft/kerncraft.py b/kerncraft/kerncraft.py index e36acc6..b3152cf 100755 --- a/kerncraft/kerncraft.py +++ b/kerncraft/kerncraft.py @@ -328,7 +328,7 @@ def run(parser, args, output_file=sys.stdout): else: description = str(args.code_file.read()) args.code_file.close() - yaml = ruamel.YAML(typ='rt') + yaml = ruamel.yaml.YAML(typ='rt') kernel = KernelDescription(yaml.load(description), machine=machine) loop_indices = set([symbol_pos_int(l['index']) for l in kernel.get_loop_stack()]) diff --git a/kerncraft/machinemodel.py b/kerncraft/machinemodel.py index db9a169..a8b3750 100755 --- a/kerncraft/machinemodel.py +++ b/kerncraft/machinemodel.py @@ -162,7 +162,7 @@ def __init__(self, path_to_yaml=None, machine_yaml=None, args=None): if abspath_to_yaml not in self._loaded_machine_yaml: with open(path_to_yaml, 'r') as f: # Ignore ruamel unsafe loading warning, by supplying Loader parameter - yaml = ruamel.YAML(typ='rt') + yaml = ruamel.yaml.YAML(typ='rt') self._loaded_machine_yaml[abspath_to_yaml] = yaml.load(f) self._data = self._loaded_machine_yaml[abspath_to_yaml] elif machine_yaml: diff --git a/tests/test_kernel.py b/tests/test_kernel.py index e42b506..541749b 100644 --- a/tests/test_kernel.py +++ b/tests/test_kernel.py @@ -18,7 +18,7 @@ def setUp(self): with open(self._find_file('3d-7pt.c')) as f: self.threed_code = f.read() with open(self._find_file('2d-5pt.yml')) as f: - yaml = ruamel.YAML(typ='rt') + yaml = ruamel.yaml.YAML(typ='rt') self.twod_description = yaml.load(f.read()) with open(self._find_file('copy-2d-linearized.c')) as f: self.twod_linear = f.read()