diff --git a/biobb_godmd/godmd/godmd_prep.py b/biobb_godmd/godmd/godmd_prep.py index 1f27e9c..0e59857 100755 --- a/biobb_godmd/godmd/godmd_prep.py +++ b/biobb_godmd/godmd/godmd_prep.py @@ -2,6 +2,7 @@ """Module containing the GOdMDPrep class and the command line interface.""" import argparse +from typing import Optional from pathlib import Path from biobb_common.generic.biobb_object import BiobbObject from biobb_common.configuration import settings @@ -53,9 +54,10 @@ class GOdMDPrep(BiobbObject): * schema: http://edamontology.org/EDAM.owl """ + def __init__(self, input_pdb_orig_path: str, input_pdb_target_path: str, output_aln_orig_path: str, output_aln_target_path: str, - properties: dict = None, **kwargs) -> None: + properties: Optional[dict] = None, **kwargs) -> None: properties = properties or {} @@ -313,7 +315,7 @@ def launch(self): # remove temporary folder(s) self.tmp_files.extend([ - self.stage_io_dict.get("unique_dir") + self.stage_io_dict.get("unique_dir", "") ]) self.remove_tmp_files() @@ -324,7 +326,7 @@ def launch(self): def godmd_prep(input_pdb_orig_path: str, input_pdb_target_path: str, output_aln_orig_path: str, output_aln_target_path: str, - properties: dict = None, **kwargs) -> int: + properties: Optional[dict] = None, **kwargs) -> int: """Create :class:`GOdMDPrep `godmd.godmd_prep.GOdMDPrep class and execute :meth:`launch() ` method""" diff --git a/biobb_godmd/godmd/godmd_run.py b/biobb_godmd/godmd/godmd_run.py index ea5f0c6..e9a18c5 100755 --- a/biobb_godmd/godmd/godmd_run.py +++ b/biobb_godmd/godmd/godmd_run.py @@ -2,6 +2,7 @@ """Module containing the GOdMDRun class and the command line interface.""" import argparse +from typing import Optional import shutil from pathlib import Path from pathlib import PurePath @@ -61,10 +62,11 @@ class GOdMDRun(BiobbObject): * schema: http://edamontology.org/EDAM.owl """ + def __init__(self, input_pdb_orig_path: str, input_pdb_target_path: str, input_aln_orig_path: str, input_aln_target_path: str, input_config_path: str, output_log_path: str, output_ene_path: str, output_trj_path: str, output_pdb_path: str, - properties: dict = None, **kwargs) -> None: + properties: Optional[dict] = None, **kwargs) -> None: properties = properties or {} @@ -196,7 +198,7 @@ def launch(self): # remove temporary folder(s) self.tmp_files.extend([ - self.stage_io_dict.get("unique_dir"), + self.stage_io_dict.get("unique_dir", ""), ]) self.remove_tmp_files() @@ -208,7 +210,7 @@ def launch(self): def godmd_run(input_pdb_orig_path: str, input_pdb_target_path: str, input_aln_orig_path: str, input_aln_target_path: str, output_log_path: str, output_ene_path: str, output_trj_path: str, output_pdb_path: str, - input_config_path: str = None, properties: dict = None, **kwargs) -> int: + input_config_path: Optional[str] = None, properties: Optional[dict] = None, **kwargs) -> int: """Create :class:`GOdMDRun `godmd.godmd_run.GOdMDRun class and execute :meth:`launch() ` method"""