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 0db2448 commit 92a1468
Show file tree
Hide file tree
Showing 20 changed files with 66 additions and 45 deletions.
5 changes: 3 additions & 2 deletions biobb_dna/backbone/bipopulations.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"""Module containing the BIPopulations class and the command line interface."""

import argparse
from typing import Optional

import matplotlib.pyplot as plt
import pandas as pd
Expand Down Expand Up @@ -183,7 +184,7 @@ def launch(self) -> int:

# Remove temporary file(s)
self.tmp_files.extend([
self.stage_io_dict.get("unique_dir")
self.stage_io_dict.get("unique_dir", "")
])
self.remove_tmp_files()

Expand Down Expand Up @@ -233,7 +234,7 @@ def bipopulations(
input_epsilC_path: str, input_epsilW_path: str,
input_zetaC_path: str, input_zetaW_path: str,
output_csv_path: str, output_jpg_path: str,
properties: dict = None, **kwargs) -> int:
properties: Optional[dict] = None, **kwargs) -> int:
"""Create :class:`BIPopulations <dna.backbone.bipopulations.BIPopulations>` class and
execute the: meth: `launch() <dna.backbone.bipopulations.BIPopulations.launch>` method. """

Expand Down
5 changes: 3 additions & 2 deletions biobb_dna/backbone/canonicalag.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"""Module containing the CanonicalAG class and the command line interface."""

import argparse
from typing import Optional

import matplotlib.pyplot as plt
import pandas as pd
Expand Down Expand Up @@ -185,7 +186,7 @@ def launch(self) -> int:

# Remove temporary file(s)
self.tmp_files.extend([
self.stage_io_dict.get("unique_dir")
self.stage_io_dict.get("unique_dir", "")
])
self.remove_tmp_files()

Expand Down Expand Up @@ -241,7 +242,7 @@ def canonicalag(
input_alphaC_path: str, input_alphaW_path: str,
input_gammaC_path: str, input_gammaW_path: str,
output_csv_path: str, output_jpg_path: str,
properties: dict = None, **kwargs) -> int:
properties: Optional[dict] = None, **kwargs) -> int:
"""Create :class:`CanonicalAG <dna.backbone.canonicalag.CanonicalAG>` class and
execute the: meth: `launch() <dna.backbone.canonicalag.CanonicalAG.launch>` method. """

Expand Down
5 changes: 3 additions & 2 deletions biobb_dna/backbone/puckering.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"""Module containing the Puckering class and the command line interface."""

import argparse
from typing import Optional

import matplotlib.pyplot as plt
import pandas as pd
Expand Down Expand Up @@ -183,7 +184,7 @@ def launch(self) -> int:

# Remove temporary file(s)
self.tmp_files.extend([
self.stage_io_dict.get("unique_dir")
self.stage_io_dict.get("unique_dir", "")
])
self.remove_tmp_files()

Expand Down Expand Up @@ -235,7 +236,7 @@ def fix_angles(self, dataset):
def puckering(
input_phaseC_path: str, input_phaseW_path: str,
output_csv_path: str, output_jpg_path: str,
properties: dict = None, **kwargs) -> int:
properties: Optional[dict] = None, **kwargs) -> int:
"""Create :class:`Puckering <dna.backbone.puckering.Puckering>` class and
execute the: meth: `launch() <dna.backbone.puckering.Puckering.launch>` method. """

Expand Down
7 changes: 4 additions & 3 deletions biobb_dna/curvesplus/biobb_canal.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import os
import zipfile
import argparse
from typing import Optional
from pathlib import Path

from biobb_common.generic.biobb_object import BiobbObject
Expand Down Expand Up @@ -185,7 +186,7 @@ def launch(self) -> int:

# Remove temporary file(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 @@ -197,8 +198,8 @@ def launch(self) -> int:
def biobb_canal(
input_cda_file: str,
output_zip_path: str,
input_lis_file: str = None,
properties: dict = None,
input_lis_file: Optional[str] = None,
properties: Optional[dict] = None,
**kwargs) -> int:
"""Create :class:`Canal <biobb_dna.curvesplus.biobb_canal.Canal>` class and
execute the :meth:`launch() <biobb_dna.curvesplus.biobb_canal.Canal.launch>` method."""
Expand Down
5 changes: 3 additions & 2 deletions biobb_dna/curvesplus/biobb_canion.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import os
import zipfile
import argparse
from typing import Optional
from pathlib import Path
from biobb_common.generic.biobb_object import BiobbObject
from biobb_common.configuration import settings
Expand Down Expand Up @@ -196,7 +197,7 @@ def launch(self) -> int:

# Remove temporary file(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 @@ -207,7 +208,7 @@ def launch(self) -> int:

def biobb_canion(
input_cdi_path: str, input_afr_path: str, input_avg_struc_path: str,
output_zip_path: str = None, properties: dict = None, **kwargs) -> int:
output_zip_path: Optional[str] = None, properties: Optional[dict] = None, **kwargs) -> int:
"""Create :class:`Canion <biobb_dna.curvesplus.biobb_canion.Canion>` class and
execute the :meth:`launch() <biobb_dna.curvesplus.biobb_canion.Canion.launch>` method."""

Expand Down
7 changes: 4 additions & 3 deletions biobb_dna/curvesplus/biobb_curves.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import os
import zipfile
import argparse
from typing import Optional
import shutil
from pathlib import Path
from biobb_common.generic.biobb_object import BiobbObject
Expand Down Expand Up @@ -243,7 +244,7 @@ def launch(self) -> int:

# Remove temporary file(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 @@ -254,8 +255,8 @@ def launch(self) -> int:

def biobb_curves(
input_struc_path: str, output_lis_path: str, output_cda_path: str,
input_top_path: str = None, output_zip_path: str = None,
properties: dict = None, **kwargs) -> int:
input_top_path: Optional[str] = None, output_zip_path: Optional[str] = None,
properties: Optional[dict] = None, **kwargs) -> int:
"""Create :class:`Curves <biobb_dna.curvesplus.biobb_curves.Curves>` class and
execute the :meth:`launch() <biobb_dna.curvesplus.biobb_curves.Curves.launch>` method."""

Expand Down
7 changes: 4 additions & 3 deletions biobb_dna/curvesplus/canal_unzip.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import zipfile
import shutil
import argparse
from typing import Optional

from biobb_common.generic.biobb_object import BiobbObject
from biobb_common.configuration import settings
Expand Down Expand Up @@ -171,7 +172,7 @@ def launch(self) -> int:

# Remove temporary file(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 @@ -183,8 +184,8 @@ def launch(self) -> int:
def canal_unzip(
input_zip_file: str,
output_path: str,
output_list_path: str = None,
properties: dict = None,
output_list_path: Optional[str] = None,
properties: Optional[dict] = None,
**kwargs) -> int:
"""Create :class:`CanalUnzip <biobb_dna.curvesplus.canal_unzip.CanalUnzip>` class and
execute the :meth:`launch() <biobb_dna.curvesplus.canal_unzip.CanalUnzip.launch>` method."""
Expand Down
5 changes: 3 additions & 2 deletions biobb_dna/dna/dna_averages.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

"""Module containing the HelParAverages class and the command line interface."""
import argparse
from typing import Optional
from pathlib import Path

import matplotlib.pyplot as plt
Expand Down Expand Up @@ -205,7 +206,7 @@ def launch(self) -> int:

# Remove temporary file(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 @@ -216,7 +217,7 @@ def launch(self) -> int:

def dna_averages(
input_ser_path: str, output_csv_path: str, output_jpg_path: str,
properties: dict = None, **kwargs) -> int:
properties: Optional[dict] = None, **kwargs) -> int:
"""Create :class:`HelParAverages <dna.dna_averages.HelParAverages>` class and
execute the :meth:`launch() <dna.dna_averages.HelParAverages.launch>` method."""

Expand Down
5 changes: 3 additions & 2 deletions biobb_dna/dna/dna_bimodality.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import os
import zipfile
import argparse
from typing import Optional
from pathlib import Path

import pandas as pd
Expand Down Expand Up @@ -231,7 +232,7 @@ def launch(self) -> int:

# Remove temporary file(s)
self.tmp_files.extend([
self.stage_io_dict.get("unique_dir")
self.stage_io_dict.get("unique_dir", "")
])
self.remove_tmp_files()

Expand Down Expand Up @@ -293,7 +294,7 @@ def helguero_theorem(self, mean1, mean2, var1, var2):

def dna_bimodality(
input_csv_file, output_csv_path, output_jpg_path,
input_zip_file: str = None, properties: dict = None, **kwargs) -> int:
input_zip_file: Optional[str] = None, properties: Optional[dict] = None, **kwargs) -> int:
"""Create :class:`HelParBimodality <dna.dna_bimodality.HelParBimodality>` class and
execute the :meth:`launch() <dna.dna_bimodality.HelParBimodality.launch>` method."""

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

"""Module containing the HelParTimeSeries class and the command line interface."""
import argparse
from typing import Optional
import zipfile
import re
from pathlib import Path
Expand Down Expand Up @@ -263,7 +264,7 @@ def launch(self) -> int:

# Remove temporary file(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 @@ -274,7 +275,7 @@ def launch(self) -> int:

def dna_timeseries(
input_ser_path: str, output_zip_path: str,
properties: dict = None, **kwargs) -> int:
properties: Optional[dict] = None, **kwargs) -> int:
"""Create :class:`HelParTimeSeries <dna.dna_timeseries.HelParTimeSeries>` class and
execute the :meth:`launch() <dna.dna_timeseries.HelParTimeSeries.launch>` method."""

Expand Down
7 changes: 4 additions & 3 deletions biobb_dna/dna/dna_timeseries_unzip.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import zipfile
import shutil
import argparse
from typing import Optional

from biobb_dna.utils import constants
from biobb_common.generic.biobb_object import BiobbObject
Expand Down Expand Up @@ -173,7 +174,7 @@ def launch(self) -> int:

# Remove temporary file(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 @@ -186,8 +187,8 @@ def dna_timeseries_unzip(
input_zip_file: str,
output_path_csv: str,
output_path_jpg: str,
output_list_path: str = None,
properties: dict = None,
output_list_path: Optional[str] = None,
properties: Optional[dict] = None,
**kwargs) -> int:
"""Create :class:`DnaTimeseriesUnzip <biobb_dna.dna.dna_timeseries_unzip.DnaTimeseriesUnzip>` class and
execute the :meth:`launch() <biobb_dna.dna.dna_timeseries_unzip.DnaTimeseriesUnzip.launch>` method."""
Expand Down
5 changes: 3 additions & 2 deletions biobb_dna/interbp_correlations/interbpcorr.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

"""Module containing the InterBasePairCorrelation class and the command line interface."""
import argparse
from typing import Optional
from itertools import product

import numpy as np
Expand Down Expand Up @@ -233,7 +234,7 @@ def launch(self) -> int:

# Remove temporary file(s)
self.tmp_files.extend([
self.stage_io_dict.get("unique_dir"),
self.stage_io_dict.get("unique_dir", ""),
])
self.remove_tmp_files()

Expand Down Expand Up @@ -270,7 +271,7 @@ def interbpcorr(
input_filename_rise: str, input_filename_tilt: str,
input_filename_roll: str, input_filename_twist: str,
output_csv_path: str, output_jpg_path: str,
properties: dict = None, **kwargs) -> int:
properties: Optional[dict] = None, **kwargs) -> int:
"""Create :class:`HelParCorrelation <correlations.interbpcorr.InterBasePairCorrelation>` class and
execute the :meth:`launch() <correlations.interbpcorr.InterBasePairCorrelation.launch>` method."""

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

"""Module containing the InterHelParCorrelation class and the command line interface."""
import argparse
from typing import Optional

import pandas as pd
import numpy as np
Expand Down Expand Up @@ -232,7 +233,7 @@ def launch(self) -> int:

# Remove temporary file(s)
self.tmp_files.extend([
self.stage_io_dict.get("unique_dir"),
self.stage_io_dict.get("unique_dir", ""),
])
self.remove_tmp_files()

Expand Down Expand Up @@ -280,7 +281,7 @@ def interhpcorr(
input_filename_rise: str, input_filename_tilt: str,
input_filename_roll: str, input_filename_twist: str,
output_csv_path: str, output_jpg_path: str,
properties: dict = None, **kwargs) -> int:
properties: Optional[dict] = None, **kwargs) -> int:
"""Create :class:`InterHelParCorrelation <interbp_correlations.interhpcorr.InterHelParCorrelation>` class and
execute the :meth:`launch() <interbp_correlations.interhpcorr.InterHelParCorrelation.launch>` method."""

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

"""Module containing the InterSequenceCorrelation class and the command line interface."""
import argparse
from typing import Optional
from pathlib import Path

import numpy as np
Expand Down Expand Up @@ -177,7 +178,7 @@ def launch(self) -> int:

# Remove temporary file(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 @@ -199,7 +200,7 @@ def circular(x1, x2):
def interseqcorr(
input_ser_path: str,
output_csv_path: str, output_jpg_path: str,
properties: dict = None, **kwargs) -> int:
properties: Optional[dict] = None, **kwargs) -> int:
"""Create :class:`HelParCorrelation <interbp_correlations.interseqcorr.InterSequenceCorrelation>` class and
execute the :meth:`launch() <interbp_correlations.interseqcorr.InterSequenceCorrelation.launch>` method."""

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

"""Module containing the IntraBasePairCorrelation class and the command line interface."""
import argparse
from typing import Optional
from itertools import product

import numpy as np
Expand Down Expand Up @@ -233,7 +234,7 @@ def launch(self) -> int:

# Remove temporary file(s)
self.tmp_files.extend([
self.stage_io_dict.get("unique_dir")
self.stage_io_dict.get("unique_dir", "")
])
self.remove_tmp_files()

Expand Down Expand Up @@ -270,7 +271,7 @@ def intrabpcorr(
input_filename_stagger: str, input_filename_buckle: str,
input_filename_propel: str, input_filename_opening: str,
output_csv_path: str, output_jpg_path: str,
properties: dict = None, **kwargs) -> int:
properties: Optional[dict] = None, **kwargs) -> int:
"""Create :class:`HelParCorrelation <intrabp_correlations.intrabpcorr.IntraBasePairCorrelation>` class and
execute the :meth:`launch() <intrabp_correlations.intrabpcorr.IntraBasePairCorrelation.launch>` method."""

Expand Down
Loading

0 comments on commit 92a1468

Please sign in to comment.