Skip to content

Commit

Permalink
Fix lint, adapter
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Marr <git@stefan-marr.de>
  • Loading branch information
smarr committed Mar 18, 2023
1 parent 6f752c7 commit 7e3396b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions rebench/interop/adapter.py
Expand Up @@ -21,7 +21,6 @@
import pkgutil
import sys
from os.path import join
from importlib import import_module


class GaugeAdapter(object):
Expand Down Expand Up @@ -122,12 +121,12 @@ def _get_adapter_case_insensitively_from_module(mod, adapter_name):
def _load_directly(adapter_cfg, include_faulty, executor):
name, path = next(iter(adapter_cfg.items()))
full_path = join(executor.config_dir, path)
with open(full_path, 'r') as adapter_file:
with open(full_path, 'r') as adapter_file: # pylint: disable=unspecified-encoding
file_content = adapter_file.read()

module_globals = {'__name__': name}
code = compile(file_content, full_path, 'exec')
exec(code, module_globals)
exec(code, module_globals) # pylint: disable=exec-used

cls = _get_adapter_case_insensitively_from_module(module_globals, name)
return cls(include_faulty, executor)

0 comments on commit 7e3396b

Please sign in to comment.