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

mypy #86

Open
vineetbansal opened this issue Nov 1, 2024 · 0 comments
Open

mypy #86

vineetbansal opened this issue Nov 1, 2024 · 0 comments

Comments

@vineetbansal
Copy link
Contributor

If we are to leverage the use of adding type-hints (as you've done in the functions that have been doc-stringed), we should add this to the pre-commit config:

  - repo: https://github.com/pre-commit/mirrors-mypy
    rev: "v1.13.0"
    hooks:
      - id: mypy
        files: "(src|tests)"

This will likely uncover places where the types are incorrect. I notice, for example:

def stack_slices_center(
   center_slice: AnnData,
   slices: list[AnnData],
   pis: list[np.ndarray],
   ...

While I'm pretty sure pis is a torch.Tensor (if not, the calling function is probably mis-typed as well).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant