Skip to content

Commit

Permalink
[TYPING](ALL): Fix typing errors
Browse files Browse the repository at this point in the history
  • Loading branch information
PauAndrio committed Oct 17, 2024
1 parent 4a92c14 commit 6d89bdc
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 18 deletions.
7 changes: 4 additions & 3 deletions biobb_flexdyn/flexdyn/concoord_disco.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

"""Module containing the concoord_disco class and the command line interface."""
import argparse
from typing import Optional
import os
import shutil
from pathlib import Path
Expand Down Expand Up @@ -74,7 +75,7 @@ class ConcoordDisco(BiobbObject):
"""

def __init__(self, input_pdb_path: str, input_dat_path: str, output_traj_path: str,
output_rmsd_path: str, output_bfactor_path: str, properties: dict = None, **kwargs) -> None:
output_rmsd_path: str, output_bfactor_path: str, properties: Optional[dict] = None, **kwargs) -> None:

properties = properties or {}

Expand Down Expand Up @@ -242,7 +243,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()

Expand All @@ -253,7 +254,7 @@ def launch(self):

def concoord_disco(input_pdb_path: str, input_dat_path: str,
output_traj_path: str, output_rmsd_path: str, output_bfactor_path: str,
properties: dict = None, **kwargs) -> int:
properties: Optional[dict] = None, **kwargs) -> int:
"""Create :class:`ConcoordDisco <flexdyn.concoord_disco.ConcoordDisco>`flexdyn.concoord_disco.ConcoordDisco class and
execute :meth:`launch() <flexdyn.concoord_disco.ConcoordDisco.launch>` method"""

Expand Down
7 changes: 4 additions & 3 deletions biobb_flexdyn/flexdyn/concoord_dist.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

"""Module containing the concoord_dist class and the command line interface."""
import argparse
from typing import Optional
import os
import shutil
from pathlib import Path
Expand Down Expand Up @@ -62,7 +63,7 @@ class ConcoordDist(BiobbObject):
"""

def __init__(self, input_structure_path: str, output_pdb_path: str,
output_gro_path: str, output_dat_path: str, properties: dict = None, **kwargs) -> None:
output_gro_path: str, output_dat_path: str, properties: Optional[dict] = None, **kwargs) -> None:

properties = properties or {}

Expand Down Expand Up @@ -191,7 +192,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.io_dict['in'].get("stdin_file_path")
])
self.remove_tmp_files()
Expand All @@ -203,7 +204,7 @@ def launch(self):

def concoord_dist(input_structure_path: str,
output_pdb_path: str, output_gro_path: str, output_dat_path: str,
properties: dict = None, **kwargs) -> int:
properties: Optional[dict] = None, **kwargs) -> int:
"""Create :class:`ConcoordDist <flexdyn.concoord_dist.ConcoordDist>`flexdyn.concoord_dist.ConcoordDist class and
execute :meth:`launch() <flexdyn.concoord_dist.ConcoordDist.launch>` method"""

Expand Down
5 changes: 3 additions & 2 deletions biobb_flexdyn/flexdyn/imod_imc.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

"""Module containing the imode class and the command line interface."""
import argparse
from typing import Optional
import shutil
from pathlib import PurePath
from biobb_common.tools import file_utils as fu
Expand Down Expand Up @@ -52,7 +53,7 @@ class ImodImc(BiobbObject):
"""

def __init__(self, input_pdb_path: str, input_dat_path: str, output_traj_path: str,
properties: dict = None, **kwargs) -> None:
properties: Optional[dict] = None, **kwargs) -> None:

properties = properties or {}

Expand Down Expand Up @@ -159,7 +160,7 @@ def launch(self):


def imod_imc(input_pdb_path: str, input_dat_path: str, output_traj_path: str,
properties: dict = None, **kwargs) -> int:
properties: Optional[dict] = None, **kwargs) -> int:
"""Create :class:`ImodImc <flexdyn.imod_imc.ImodImc>`flexdyn.imod_imc.ImodImc class and
execute :meth:`launch() <flexdyn.imod_imc.ImodImc.launch>` method"""

Expand Down
5 changes: 3 additions & 2 deletions biobb_flexdyn/flexdyn/imod_imode.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

"""Module containing the imode class and the command line interface."""
import argparse
from typing import Optional
import shutil
from pathlib import PurePath
from biobb_common.tools import file_utils as fu
Expand Down Expand Up @@ -48,7 +49,7 @@ class ImodImode(BiobbObject):
"""

def __init__(self, input_pdb_path: str, output_dat_path: str,
properties: dict = None, **kwargs) -> None:
properties: Optional[dict] = None, **kwargs) -> None:

properties = properties or {}

Expand Down Expand Up @@ -139,7 +140,7 @@ def launch(self):


def imod_imode(input_pdb_path: str, output_dat_path: str,
properties: dict = None, **kwargs) -> int:
properties: Optional[dict] = None, **kwargs) -> int:
"""Create :class:`ImodImode <flexdyn.imod_imode.ImodImode>`flexdyn.imod_imode.ImodImode class and
execute :meth:`launch() <flexdyn.imod_imode.ImodImode.launch>` method"""

Expand Down
5 changes: 3 additions & 2 deletions biobb_flexdyn/flexdyn/imod_imove.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

"""Module containing the imode class and the command line interface."""
import argparse
from typing import Optional
import shutil
from pathlib import PurePath
from biobb_common.tools import file_utils as fu
Expand Down Expand Up @@ -51,7 +52,7 @@ class ImodImove(BiobbObject):
"""

def __init__(self, input_pdb_path: str, input_dat_path: str, output_pdb_path: str,
properties: dict = None, **kwargs) -> None:
properties: Optional[dict] = None, **kwargs) -> None:

properties = properties or {}

Expand Down Expand Up @@ -142,7 +143,7 @@ def launch(self):


def imod_imove(input_pdb_path: str, input_dat_path: str, output_pdb_path: str,
properties: dict = None, **kwargs) -> int:
properties: Optional[dict] = None, **kwargs) -> int:
"""Create :class:`ImodImove <flexdyn.imod_imove.ImodImove>`flexdyn.imod_imove.ImodImove class and
execute :meth:`launch() <flexdyn.imod_imove.ImodImove.launch>` method"""

Expand Down
7 changes: 4 additions & 3 deletions biobb_flexdyn/flexdyn/nolb_nma.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

"""Module containing the nolb class and the command line interface."""
import argparse
from typing import Optional
import shutil
from pathlib import Path
from biobb_common.generic.biobb_object import BiobbObject
Expand Down Expand Up @@ -49,7 +50,7 @@ class Nolb_nma(BiobbObject):
"""

def __init__(self, input_pdb_path: str, output_pdb_path: str,
properties: dict = None, **kwargs) -> None:
properties: Optional[dict] = None, **kwargs) -> None:

properties = properties or {}

Expand Down Expand Up @@ -130,7 +131,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()

Expand All @@ -140,7 +141,7 @@ def launch(self):


def nolb_nma(input_pdb_path: str, output_pdb_path: str,
properties: dict = None, **kwargs) -> int:
properties: Optional[dict] = None, **kwargs) -> int:
"""Create :class:`Nolb_nma <flexdyn.nolb_nma.Nolb_nma>`flexdyn.nolb_nma.Nolb_nma class and
execute :meth:`launch() <flexdyn.nolb_nma.Nolb_nma.launch>` method"""

Expand Down
7 changes: 4 additions & 3 deletions biobb_flexdyn/flexdyn/prody_anm.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

"""Module containing the prody_anm class and the command line interface."""
import argparse
from typing import Optional
import prody
from biobb_common.generic.biobb_object import BiobbObject
from biobb_common.configuration import settings
Expand Down Expand Up @@ -51,7 +52,7 @@ class ProdyANM(BiobbObject):
"""

def __init__(self, input_pdb_path: str, output_pdb_path: str,
properties: dict = None, **kwargs) -> None:
properties: Optional[dict] = None, **kwargs) -> None:

properties = properties or {}

Expand Down Expand Up @@ -112,7 +113,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()

Expand All @@ -122,7 +123,7 @@ def launch(self):


def prody_anm(input_pdb_path: str, output_pdb_path: str,
properties: dict = None, **kwargs) -> int:
properties: Optional[dict] = None, **kwargs) -> int:
"""Create :class:`ProdyANM <flexdyn.prody_anm.ProdyANM>`flexdyn.prody_anm.ProdyANM class and
execute :meth:`launch() <flexdyn.prody_anm.ProdyANM.launch>` method"""

Expand Down

0 comments on commit 6d89bdc

Please sign in to comment.