-
Notifications
You must be signed in to change notification settings - Fork 1.5k
fixes the missing type annotations #5605
Copy link
Copy link
Closed
Labels
Description
Is your feature request related to a problem? Please describe.
running the mypy commands
# python -m pip install -U -r requirements-dev.txt
./runtests.sh --mypygenerates the following warning messages, would be great to add type annotations to those functions.
monai/data/meta_obj.py:83:9: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
monai/data/meta_obj.py:84:9: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
monai/data/meta_obj.py:85:9: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
monai/data/meta_obj.py:86:9: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
monai/data/meta_tensor.py:372:9: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
monai/transforms/intensity/dictionary.py:1589:9: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
monai/transforms/intensity/dictionary.py:1662:9: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
monai/data/image_reader.py:292:9: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
monai/data/image_reader.py:293:9: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
monai/data/image_reader.py:613:9: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
monai/data/image_reader.py:614:9: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
monai/data/image_reader.py:944:9: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
monai/data/image_reader.py:945:9: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
monai/data/image_reader.py:1110:9: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
monai/data/image_reader.py:1111:9: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
monai/data/image_reader.py:1201:9: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
monai/data/image_reader.py:1202:9: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
monai/data/dataset.py:1076:13: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
...
The warning is because functions that do not have any annotations (neither for any argument nor for the return type) are not type-checked
Reactions are currently unavailable