diff --git a/sklbench/utils/common.py b/sklbench/utils/common.py index 06486428..4686d6b3 100755 --- a/sklbench/utils/common.py +++ b/sklbench/utils/common.py @@ -66,7 +66,11 @@ def read_output_from_command(command: str) -> Tuple[int, str, str]: stderr=sp.PIPE, encoding="utf-8", ) - return res.returncode, res.stdout[:-1], res.stderr[:-1] + return ( + res.returncode, + res.stdout.strip(), + res.stderr.strip(), + ) def hash_from_json_repr(x: JsonTypesUnion, hash_limit: int = 5) -> str: @@ -120,7 +124,7 @@ def flatten_list(input_list: List, ensure_type_homogeneity: bool = False) -> Lis def get_module_members( - module_names_chain: Union[List, str] + module_names_chain: Union[List, str], ) -> Tuple[ModuleContentMap, ModuleContentMap]: def get_module_name(module_names_chain: List[str]) -> str: name = module_names_chain[0]