google / google/scaaml

mypy is questionable

Open
#85 3 comments 0 reactions 1 assignee Claimed by @kralka View on GitHub
Dominant language
Python
Stars
207
Forks
62
Avg merge
12h 23m
Merged PRs (30d)
4

Description

It seems that mypy has not discovered wrong return type typehint in [scaaml.io.Dataset.as_tfdataset](https://github.com/google/scaaml/blob/8b7e5ff700005c393f48aa1b22530f0f5a784bc4/scaaml/io/dataset.py#L380).

There are two issues:

1. Fixing the typehint.
2. Debugging and fixing mypy typechecking.

Python interpreter types the output as a tuple, when unpacking the types are tf.data.PrefetchDataset, dict, dict. The proper type should be Tuple[tf.data.Dataset, Dict, Dict]. Definitely not a Union of those.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.