tensorflow / transform

Input pipeline framework
Apache License 2.0
984 stars 214 forks source link

Expose type information #283

Closed hmc-cs-mdrissi closed 2 years ago

hmc-cs-mdrissi commented 2 years ago

Would it be doable to add a py.typed file so that the type hints present are usable for code that imports tft. I see tft codebase looks well type hinted, but if I run pyright/mypy on functions imported from tft since py.typed is missing it's treated all like Any.

https://peps.python.org/pep-0561/ explains purpose of this file.

Edit: If you would be comfortable exposing type information then I’d be happy to make a small pr for packaging change needed.

zoyahav commented 2 years ago

Sure, I ended up making the PR because it required a bit of configuration on our side - https://github.com/tensorflow/transform/commit/9cbe5c238c2688f205a6f30b8e47bc158dde4cd7