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 ada4b70 commit 9999cbb
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 29 deletions.
15 changes: 7 additions & 8 deletions biobb_pmx/docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

import sys
from pathlib import Path
from typing import List, Dict

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
Expand Down Expand Up @@ -92,9 +91,9 @@
# Else, today_fmt is used as the format for a strftime call.
# today_fmt = '%B %d, %Y'

# List of patterns, relative to source directory, that match files and
# list of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns: List[str] = []
exclude_patterns: list[str] = []

# The reST default role (used for this markup: `text`) to use for all
# documents.
Expand All @@ -120,7 +119,7 @@
# If true, keep warnings as "system message" paragraphs in the built documents.
# keep_warnings = False

# If true, `todo` and `todoList` produce output, else they produce nothing.
# If true, `todo` and `todolist` produce output, else they produce nothing.
todo_include_todos = False


Expand Down Expand Up @@ -228,7 +227,7 @@ def setup(app):

# -- Options for LaTeX output ---------------------------------------------

latex_elements: Dict[str, str] = {
latex_elements: dict[str, str] = {
# The paper size ('letterpaper' or 'a4paper').
# 'papersize': 'letterpaper',

Expand All @@ -242,7 +241,7 @@ def setup(app):
# 'figure_align': 'htbp',
}

# Grouping the document tree into LaTeX files. List of tuples
# Grouping the document tree into LaTeX files. list of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
Expand Down Expand Up @@ -273,7 +272,7 @@ def setup(app):

# -- Options for manual page output ---------------------------------------

# One entry per manual page. List of tuples
# One entry per manual page. list of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'biobb_pmx', u'biobb_pmx Documentation',
Expand All @@ -286,7 +285,7 @@ def setup(app):

# -- Options for Texinfo output -------------------------------------------

# Grouping the document tree into Texinfo files. List of tuples
# Grouping the document tree into Texinfo files. list of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
Expand Down
7 changes: 4 additions & 3 deletions biobb_pmx/pmxbiobb/pmxanalyse.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

"""Module containing the PMX analyse class and the command line interface."""
import argparse
from typing import Optional
from pathlib import Path
import shutil
from typing import Dict, Optional
from typing import Optional
from biobb_common.generic.biobb_object import BiobbObject
from biobb_common.configuration import settings
from biobb_common.tools import file_utils as fu
Expand Down Expand Up @@ -76,7 +77,7 @@ class Pmxanalyse(BiobbObject):
"""

def __init__(self, input_a_xvg_zip_path: str, input_b_xvg_zip_path: str, output_result_path: str, output_work_plot_path: str,
properties: Optional[Dict] = None, **kwargs) -> None:
properties: Optional[dict] = None, **kwargs) -> None:
properties = properties or {}

# Call parent class constructor
Expand Down Expand Up @@ -210,7 +211,7 @@ def launch(self) -> int:

def pmxanalyse(input_a_xvg_zip_path: str, input_b_xvg_zip_path: str,
output_result_path: str, output_work_plot_path: str,
properties: Optional[Dict] = None, **kwargs) -> int:
properties: Optional[dict] = None, **kwargs) -> int:
"""Execute the :class:`Pmxanalyse <pmx.pmxanalyse.Pmxanalyse>` class and
execute the :meth:`launch() <pmx.pmxanalyse.Pmxanalyse.launch> method."""

Expand Down
7 changes: 4 additions & 3 deletions biobb_pmx/pmxbiobb/pmxatom_mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
from pathlib import Path
import shutil
import argparse
from typing import Dict, Optional
from typing import Optional
from typing import Optional
from biobb_common.generic.biobb_object import BiobbObject
from biobb_common.configuration import settings
from biobb_common.tools.file_utils import launchlogger
Expand Down Expand Up @@ -83,7 +84,7 @@ class Pmxatom_mapping(BiobbObject):
def __init__(self, input_structure1_path: str, input_structure2_path: str, output_pairs1_path: str, output_pairs2_path: str,
output_log_path: str, output_structure1_path: Optional[str] = None, output_structure2_path: Optional[str] = None, output_morph1_path: Optional[str] = None,
output_morph2_path: Optional[str] = None, output_scaffold1_path: Optional[str] = None, output_scaffold2_path: Optional[str] = None, output_score_path: Optional[str] = None,
properties: Optional[Dict] = None, **kwargs) -> None:
properties: Optional[dict] = None, **kwargs) -> None:
properties = properties or {}

# Call parent class constructor
Expand Down Expand Up @@ -236,7 +237,7 @@ def launch(self) -> int:
def pmxatom_mapping(input_structure1_path: str, input_structure2_path: str, output_pairs1_path: str, output_pairs2_path: str,
output_log_path: str, output_structure1_path: Optional[str] = None, output_structure2_path: Optional[str] = None, output_morph1_path: Optional[str] = None,
output_morph2_path: Optional[str] = None, output_scaffold1_path: Optional[str] = None, output_scaffold2_path: Optional[str] = None, output_score_path: Optional[str] = None,
properties: Optional[Dict] = None, **kwargs) -> int:
properties: Optional[dict] = None, **kwargs) -> int:
"""Execute the :class:`Pmxatom_mapping <pmx.pmxmutate.Pmxatom_mapping>` class and
execute the :meth:`launch() <pmx.pmxatom_mapping.Pmxatom_mapping.launch> method."""

Expand Down
7 changes: 4 additions & 3 deletions biobb_pmx/pmxbiobb/pmxcreate_top.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
from pathlib import Path, PurePath
import shutil
import argparse
from typing import Dict, Optional
from typing import Optional
from typing import Optional
from biobb_common.generic.biobb_object import BiobbObject
from biobb_common.configuration import settings
from biobb_common.tools import file_utils as fu
Expand Down Expand Up @@ -63,7 +64,7 @@ class Pmxcreate_top(BiobbObject):
"""

def __init__(self, input_topology1_path: str, input_topology2_path: str, output_topology_path: str,
properties: Optional[Dict] = None, **kwargs) -> None:
properties: Optional[dict] = None, **kwargs) -> None:
properties = properties or {}

# Call parent class constructor
Expand Down Expand Up @@ -173,7 +174,7 @@ def launch(self) -> int:


def pmxcreate_top(input_topology1_path: str, input_topology2_path: str, output_topology_path: str,
properties: Optional[Dict] = None, **kwargs) -> int:
properties: Optional[dict] = None, **kwargs) -> int:
"""Execute the :class:`Pmxcreate_top <pmx.pmxcreate_top.Pmxcreate_top>` class and
execute the :meth:`launch() <pmx.pmxmcreate_top.Pmxmcreate_top.launch> method."""

Expand Down
7 changes: 4 additions & 3 deletions biobb_pmx/pmxbiobb/pmxgentop.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
import os
import sys
import argparse
from typing import Optional
import shutil
from pathlib import Path
from typing import Dict, Optional
from typing import Optional
from biobb_common.generic.biobb_object import BiobbObject
from biobb_common.configuration import settings
from biobb_common.tools import file_utils as fu
Expand Down Expand Up @@ -62,7 +63,7 @@ class Pmxgentop(BiobbObject):
"""

def __init__(self, input_top_zip_path: str, output_top_zip_path: str,
properties: Optional[Dict] = None, **kwargs) -> None:
properties: Optional[dict] = None, **kwargs) -> None:
properties = properties or {}

# Call parent class constructor
Expand Down Expand Up @@ -179,7 +180,7 @@ def launch(self) -> int:
return self.return_code


def pmxgentop(input_top_zip_path: str, output_top_zip_path: str, properties: Optional[Dict] = None, **kwargs) -> int:
def pmxgentop(input_top_zip_path: str, output_top_zip_path: str, properties: Optional[dict] = None, **kwargs) -> int:
"""Execute the :class:`Pmxgentop <pmx.pmxgentop.Pmxgentop>` class and
execute the :meth:`launch() <pmx.pmxgentop.Pmxgentop.launch> method."""

Expand Down
7 changes: 4 additions & 3 deletions biobb_pmx/pmxbiobb/pmxligand_hybrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
from pathlib import Path
import shutil
import argparse
from typing import Dict, Optional
from typing import Optional
from typing import Optional
from biobb_common.generic.biobb_object import BiobbObject
from biobb_common.configuration import settings
from biobb_common.tools.file_utils import launchlogger
Expand Down Expand Up @@ -84,7 +85,7 @@ class Pmxligand_hybrid(BiobbObject):
def __init__(self, input_structure1_path: str, input_structure2_path: str, input_topology1_path: str, input_topology2_path: str,
output_log_path: str, output_structure1_path: str, output_structure2_path: str, output_topology_path: str, output_atomtypes_path: str,
input_scaffold1_path: Optional[str] = None, input_scaffold2_path: Optional[str] = None, input_pairs_path: Optional[str] = None,
properties: Optional[Dict] = None, **kwargs) -> None:
properties: Optional[dict] = None, **kwargs) -> None:

properties = properties or {}

Expand Down Expand Up @@ -209,7 +210,7 @@ def launch(self) -> int:
def pmxligand_hybrid(input_structure1_path: str, input_structure2_path: str, input_topology1_path: str, input_topology2_path: str,
output_log_path: str, output_structure1_path: str, output_structure2_path: str, output_topology_path: str, output_atomtypes_path: str,
input_scaffold1_path: Optional[str] = None, input_scaffold2_path: Optional[str] = None, input_pairs_path: Optional[str] = None,
properties: Optional[Dict] = None, **kwargs) -> int:
properties: Optional[dict] = None, **kwargs) -> int:
"""Execute the :class:`Pmxligand_hybrid <pmx.pmxmutate.Pmxligand_hybrid>` class and
execute the :meth:`launch() <pmx.pmxligand_hybrid.Pmxligand_hybrid.launch> method."""

Expand Down
7 changes: 4 additions & 3 deletions biobb_pmx/pmxbiobb/pmxmerge_ff.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
from pathlib import Path
import glob
import argparse
from typing import Optional
from pmx import ligand_alchemy # type: ignore
from typing import Dict, Optional
from typing import Optional
from biobb_common.generic.biobb_object import BiobbObject
from biobb_common.configuration import settings
from biobb_common.tools import file_utils as fu
Expand Down Expand Up @@ -57,7 +58,7 @@ class Pmxmerge_ff(BiobbObject):
"""

def __init__(self, input_topology_path: str, output_topology_path: str, properties: Optional[Dict] = None, **kwargs) -> None:
def __init__(self, input_topology_path: str, output_topology_path: str, properties: Optional[dict] = None, **kwargs) -> None:
properties = properties or {}

# Call parent class constructor
Expand Down Expand Up @@ -128,7 +129,7 @@ def launch(self) -> int:
return self.return_code


def pmxmerge_ff(input_topology_path: str, output_topology_path: str, properties: Optional[Dict] = None, **kwargs) -> int:
def pmxmerge_ff(input_topology_path: str, output_topology_path: str, properties: Optional[dict] = None, **kwargs) -> int:
"""Execute the :class:`Pmxmerge_ff <pmx.pmxmerge_ff.Pmxmerge_ff>` class and
execute the :meth:`launch() <pmx.pmxmerge_ff.Pmxmerge_ff.launch> method."""

Expand Down
7 changes: 4 additions & 3 deletions biobb_pmx/pmxbiobb/pmxmutate.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
import sys
import shutil
import argparse
from typing import Dict, Optional
from typing import Optional
from typing import Optional
from biobb_pmx.pmxbiobb.common import create_mutations_file, MUTATION_DICT
from biobb_common.generic.biobb_object import BiobbObject
from biobb_common.configuration import settings
Expand Down Expand Up @@ -66,7 +67,7 @@ class Pmxmutate(BiobbObject):
"""

def __init__(self, input_structure_path: str, output_structure_path: str, input_b_structure_path: Optional[str] = None,
properties: Optional[Dict] = None, **kwargs) -> None:
properties: Optional[dict] = None, **kwargs) -> None:
properties = properties or {}

# Call parent class constructor
Expand Down Expand Up @@ -158,7 +159,7 @@ def launch(self) -> int:


def pmxmutate(input_structure_path: str, output_structure_path: str,
input_b_structure_path: Optional[str] = None, properties: Optional[Dict] = None,
input_b_structure_path: Optional[str] = None, properties: Optional[dict] = None,
**kwargs) -> int:
"""Execute the :class:`Pmxmutate <pmx.pmxmutate.Pmxmutate>` class and
execute the :meth:`launch() <pmx.pmxmutate.Pmxmutate.launch> method."""
Expand Down

0 comments on commit 9999cbb

Please sign in to comment.