-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Closed
Labels
high prioritymodule: typingRelated to mypy type annotationsRelated to mypy type annotationstriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module
Description
🚀 Feature
It is difficult to control the validity of function arguments when they are in different files.
Very often the information in *.pyi does not match *.py.
pytorch/torch/utils/data/dataloader.pyi
Line 35 in fcd1354
| class _DataLoaderIter: |
I suggest using Python 2 Annotations:
def optional_unwrap (self, x, y):
# type: (Optional [int], Optional [int]) -> intYou can expand this format to indicate in which file to place annotations.
After that, all *.pyi can be completely assembled in one script. Information will always be up to date.
Metadata
Metadata
Assignees
Labels
high prioritymodule: typingRelated to mypy type annotationsRelated to mypy type annotationstriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module