Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor functions that heavily rely on None types #429

Merged
merged 8 commits into from
Aug 6, 2024

Conversation

rvhonorato
Copy link
Member

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

@rvhonorato rvhonorato requested a review from mgiulini May 22, 2024 12:39
@rvhonorato rvhonorato self-assigned this May 22, 2024
@rvhonorato rvhonorato linked an issue May 22, 2024 that may be closed by this pull request
@rvhonorato rvhonorato marked this pull request as draft May 22, 2024 12:40
@rvhonorato rvhonorato marked this pull request as ready for review May 22, 2024 12:43
mgiulini
mgiulini previously approved these changes Jun 25, 2024
@rvhonorato rvhonorato merged commit 736a351 into main Aug 6, 2024
6 checks passed
@rvhonorato rvhonorato deleted the 425-refactor-none-type-functions branch August 6, 2024 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor None type functions
2 participants