Skip to content

initiate typing checks #653

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

Closed
2 tasks
yarikoptic opened this issue Mar 29, 2023 · 1 comment · Fixed by #656
Closed
2 tasks

initiate typing checks #653

yarikoptic opened this issue Mar 29, 2023 · 1 comment · Fixed by #656
Assignees

Comments

@yarikoptic
Copy link
Member

  • tox.ini setup
  • CI with type checking at least some files if cannot be done through out at once. thus marking easy since not full type annotation is requested
current state of running mypy
❯ git grep mypy
❯ mypy heudiconv
heudiconv/heuristics/multires_7Tbold.py:25: error: Cannot find implementation or library stub for module named "dicom"  [import]
heudiconv/external/pydicom.py:8: error: Cannot find implementation or library stub for module named "pydicom"  [import]
heudiconv/external/pydicom.py:11: error: Cannot find implementation or library stub for module named "dicom"  [import]
heudiconv/due.py:55: error: Skipping analyzing "duecredit": module is installed, but missing library stubs or py.typed marker  [import]
heudiconv/cli/monitor.py:12: error: Cannot find implementation or library stub for module named "inotify.adapters"  [import]
heudiconv/cli/monitor.py:12: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
heudiconv/cli/monitor.py:12: error: Cannot find implementation or library stub for module named "inotify"  [import]
heudiconv/cli/monitor.py:13: error: Cannot find implementation or library stub for module named "inotify.constants"  [import]
heudiconv/cli/monitor.py:15: error: Cannot find implementation or library stub for module named "tinydb"  [import]
heudiconv/utils.py:19: error: Cannot find implementation or library stub for module named "nipype.utils.filemanip"  [import]
heudiconv/utils.py:53: error: List or tuple literal expected as the second argument to "namedtuple()"  [misc]
heudiconv/tests/utils.py:61: error: Skipping analyzing "datalad": module is installed, but missing library stubs or py.typed marker  [import]
heudiconv/heuristics/reproin.py:159: error: Need type annotation for "fix_accession2run" (hint: "fix_accession2run: Dict[<type>, <type>] = ...")  [var-annotated]
heudiconv/heuristics/reproin.py:170: error: Need type annotation for "protocols2fix" (hint: "protocols2fix: Dict[<type>, <type>] = ...")  [var-annotated]
heudiconv/heuristics/reproin.py:197: error: Need type annotation for "dicoms2skip" (hint: "dicoms2skip: List[<type>] = ...")  [var-annotated]
heudiconv/external/dcmstack.py:27: error: Cannot find implementation or library stub for module named "dcmstack"  [import]
heudiconv/dicoms.py:24: error: Cannot find implementation or library stub for module named "nibabel.nicom.dicomwrappers"  [import]
heudiconv/dicoms.py:24: error: Cannot find implementation or library stub for module named "nibabel.nicom"  [import]
heudiconv/dicoms.py:24: error: Cannot find implementation or library stub for module named "nibabel"  [import]
heudiconv/dicoms.py:365: error: Missing return statement  [return]
heudiconv/dicoms.py:548: error: Cannot find implementation or library stub for module named "nipype"  [import]
heudiconv/dicoms.py:606: error: Cannot find implementation or library stub for module named "dcmstack.extract"  [import]
heudiconv/dicoms.py:606: error: Cannot find implementation or library stub for module named "dcmstack"  [import]
heudiconv/external/dlad.py:18: error: Skipping analyzing "datalad.api": module is installed, but missing library stubs or py.typed marker  [import]
heudiconv/external/dlad.py:37: error: Skipping analyzing "datalad": module is installed, but missing library stubs or py.typed marker  [import]
heudiconv/external/dlad.py:39: error: Skipping analyzing "datalad.support.annexrepo": module is installed, but missing library stubs or py.typed marker  [import]
heudiconv/external/dlad.py:40: error: Skipping analyzing "datalad.support.external_versions": module is installed, but missing library stubs or py.typed marker  [import]
heudiconv/bids.py:618: error: Cannot find implementation or library stub for module named "nibabel"  [import]
heudiconv/convert.py:670: error: Cannot find implementation or library stub for module named "nipype"  [import]
heudiconv/convert.py:675: error: Cannot find implementation or library stub for module named "nipype.interfaces.dcm2nii"  [import]
heudiconv/convert.py:733: error: Cannot find implementation or library stub for module named "nipype.interfaces.base"  [import]
heudiconv/main.py:299: error: Skipping analyzing "etelemetry": module is installed, but missing library stubs or py.typed marker  [import]
heudiconv/tests/test_regression.py:17: error: Skipping analyzing "datalad.support.exceptions": module is installed, but missing library stubs or py.typed marker  [import]
heudiconv/tests/test_monitor.py:7: error: Cannot find implementation or library stub for module named "tinydb"  [import]
heudiconv/tests/test_monitor.py:16: error: First argument to namedtuple() should be "Header", not "header"  [name-match]
heudiconv/tests/test_monitor.py:71: error: Argument 1 to "CalledProcessError" has incompatible type "str"; expected "int"  [arg-type]
heudiconv/tests/test_monitor.py:71: error: Argument 2 to "CalledProcessError" has incompatible type "int"; expected "Union[Union[str, bytes, PathLike[str], PathLike[bytes]], Sequence[Union[str, bytes, PathLike[str], PathLike[bytes]]]]"  [arg-type]
heudiconv/tests/test_main.py:121: error: Skipping analyzing "datalad.api": module is installed, but missing library stubs or py.typed marker  [import]
heudiconv/tests/test_heuristics.py:25: error: Skipping analyzing "datalad.api": module is installed, but missing library stubs or py.typed marker  [import]
heudiconv/tests/test_bids.py:20: error: Cannot find implementation or library stub for module named "nibabel"  [import]
heudiconv/tests/test_bids.py:59: error: Skipping analyzing "datalad.support.exceptions": module is installed, but missing library stubs or py.typed marker  [import]
Found 40 errors in 18 files (checked 48 source files)
@github-actions
Copy link

github-actions bot commented May 8, 2023

🚀 Issue was released in v0.13.0 🚀

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

Successfully merging a pull request may close this issue.

2 participants