From 9df685d93ccaafe82448512b4d8016501207e8f5 Mon Sep 17 00:00:00 2001 From: Thomas Soenen Date: Fri, 17 Jun 2022 14:08:34 +0200 Subject: [PATCH] hound fixes --- easybuild/tools/module_naming_scheme/generation_mns.py | 5 +++-- test/framework/module_generator.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/easybuild/tools/module_naming_scheme/generation_mns.py b/easybuild/tools/module_naming_scheme/generation_mns.py index 3f6e1123d1..0d98168295 100644 --- a/easybuild/tools/module_naming_scheme/generation_mns.py +++ b/easybuild/tools/module_naming_scheme/generation_mns.py @@ -41,6 +41,7 @@ GMNS_ENV = "GENERATION_MODULE_NAMING_SCHEME_LOOKUP_TABLE" + class GenerationModuleNamingScheme(ModuleNamingScheme): """Class implementing the generational module naming scheme.""" @@ -71,14 +72,14 @@ def __init__(self): print_result=False) self.generations = [x.split('-')[1].split('.')[0] for x in foss_filenames] - # get_toolchain_hierarchy() depends on ActiveMNS(), which can't point to + # get_toolchain_hierarchy() depends on ActiveMNS(), which can't point to # GenerationModuleNamingScheme to prevent circular reference errors. For that purpose, the MNS # that ActiveMNS() points to is tweaked while get_toolchain_hierarchy() is used. ConfigurationVariables()._FrozenDict__dict['module_naming_scheme'] = 'EasyBuildMNS' # map generations on toolchains for generation in self.generations: - for tc in get_toolchain_hierarchy({'name':'foss', 'version':generation}): + for tc in get_toolchain_hierarchy({'name': 'foss', 'version': generation}): self.lookup_table[(tc['name'], tc['version'])] = generation # include (foss, ) as a toolchain aswell self.lookup_table[('foss', generation)] = generation diff --git a/test/framework/module_generator.py b/test/framework/module_generator.py index b5d1983805..3dc3bbe2bc 100644 --- a/test/framework/module_generator.py +++ b/test/framework/module_generator.py @@ -1493,7 +1493,7 @@ def test_ec(ecfile, short_modname, mod_subdir, modpath_exts, user_modpath_exts, # test error for examples without toolchain-generation mapping in lookup table. EasyConfig() calls # det_module_subdir() of the generationModuleNamingScheme object for the toolchain (binutils) with self.assertRaises(EasyBuildError) as cm: - ec = EasyConfig(glob.glob(os.path.join(ecs_dir, '*', '*', 'hwloc-1.6.2-GCC-4.9.3-2.26.eb'))[0]) + EasyConfig(glob.glob(os.path.join(ecs_dir, '*', '*', 'hwloc-1.6.2-GCC-4.9.3-2.26.eb'))[0]) msg = "Couldn't map software version (binutils, 2.26) to a generation. Provide a customtoolchain " \ "mapping through GENERATION_MODULE_NAMING_SCHEME_LOOKUP_TABLE"