haddocking / arctic3d

Automatic Retrieval and ClusTering of Interfaces in Complexes from 3D structural information
Apache License 2.0
27 stars 6 forks source link

Refactor functions that heavily rely on None types #429

Closed rvhonorato closed 2 months ago

rvhonorato commented 5 months ago

This PR does some minor simplification on the return types of some functions.

This is not a comprehensive change since there are several functions that have very complex returns and arguments, and should be addressed individually. For example:

def get_maxint_pdb(
    validated_pdbs: list[
        tuple[Path, Path, dict[str, Union[int, float, str, None]]]
    ],
    interface_residues: dict[str, list[int]],
    int_cov_cutoff: float = 0.7,
) -> tuple[
    Union[Path, None],
    Union[Path, None],
    Union[dict[str, Union[int, float, str, None]], None],
    Union[dict[Any, Any], None],
]:

Here I also added a mypy check to the CI pipeline and completed the missing function signatures in the pdb module