-
Notifications
You must be signed in to change notification settings - Fork 18
Typing correctness & improvements #87
Copy link
Copy link
Open
Description
It's great that clustpy has type hints, but some of them are incorrect/outdated. Examples:
ClustPy/clustpy/data/real_torchvision_data.py
Lines 16 to 17 in b52d11a
def _get_data_and_labels(dataset: torchvision.datasets.VisionDataset, image_size: tuple) -> ( torch.Tensor, torch.Tensor):
(torch.Tensor, torch.Tensor)is incorrect, it shout betuple[torch.Tensor, torch.Tensor]- https://github.com/collinleiber/ClustPy/blob/b52d11a01c9f6e5f18ccc5b92339a62a80ce7f41/clustpy/deep/_data_utils.py#L4C1-L4C34
Should befrom collections.abc import Callableas you want to rely on built-ins as much as possible. - Same for the
typing.List, uselistinstead.
I'm sure there are others as well. Ideally, correctness would be verified with mypy or so but I realize that this is a lot of work.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels