Re:Python’s “type hints” are a bit of a disappointment to me
by Mehdi2277 on Friday April 22, 2022 @04:36AM
(#31119446)
You can write type stubs for other libraries. Over past year my team had a 100k line codebase that we’ve gotten mostly typed. But we still use a lot of other untyped libraries like tensorflow. So in past couple months we’ve started adding type stubs to the parts of the api we use. While tensorflow/numpy/etc are massive libraries most people only use a small subset of api. You can write type stubs for the subset you use. It definitely takes time but I find it very helpful to have useful type checking of tensorflow so I bit bullet and started writing stubs. I explored upstreaming them to type shed but got lazy on dealing with CI issue although I hope to revisit it later.
[ Parent
| on HN ]
Re:Python’s “type hints” are a bit of a disappointment to me
by zhfliz on Friday April 22, 2022 @05:55AM
(#31119849)
https://github.com/python/typeshed also provides community maintained stub packages for packages that are lacking upstream type hints