google-cloud-python icon indicating copy to clipboard operation
google-cloud-python copied to clipboard

Adding type hints so static analyzers like mypy can work with google.cloud

Open maroux opened this issue 4 years ago • 10 comments

maroux avatar Mar 09 '21 00:03 maroux

Hi @maroux,

Is this a general request for the google-cloud-* libraries, or do you have a particular library you're interested in?

busunkim96 avatar Mar 09 '21 15:03 busunkim96

@busunkim96 well, it applies to all gcloud libraries but in particular I hit this problem with the storage library. I can open an issue with that repo if that's helpful.

maroux avatar Mar 09 '21 21:03 maroux

Hi @maroux,

If you could also open a issue there that would be great. https://github.com/googleapis/python-storage/issues I believe storage is still technically supporting 2.7 so that is probably one blocker.

busunkim96 avatar Mar 09 '21 21:03 busunkim96

Done googleapis/python-storage#393

maroux avatar Mar 09 '21 22:03 maroux

+1. Absence of type hints is making working with these libraries a much less pleasant experience both from the UX perspective (in the IDE) and the productionization perspective (static analysis).

kovalevvlad avatar Aug 02 '22 15:08 kovalevvlad

Adding type hints would've prevented a recent bug that I worked on while integrating recaptcha. Any updates if this is something that might be introduced in google-cloud package? Any alternatives that folks suggest?

beberry avatar Aug 02 '23 03:08 beberry

+1

AutonomousCat avatar Apr 27 '24 21:04 AutonomousCat

+1

raulsf6 avatar May 13 '24 14:05 raulsf6

+1, python typing sucks, throw us all a bone 😀