Add typing mypy #318
Labels
api: storage
Issues related to the googleapis/python-storage API.
type: feature request
‘Nice-to-have’ improvement, new feature or different behavior or design.
Is your feature request related to a problem? Please describe.
I'd like to catch common issues w/ mypy CI.
For example
lookup_bucket("foo").blob("bar")
mypy static analysis could tell us "lookup_bucket is Optional[storage.Blob] and NoneType has no method blob"This can avoid code review comments like this: GoogleCloudPlatform/bigquery-utils#190 (comment)
Describe the solution you'd like
Please add typing so common issues can get caught w/ mypy in CI
Describe alternatives you've considered
Alternatively, each user of this library wanting this feature can implement a mypy stub but this would be better to maintain in the centralized codebase for google-cloud-storage https://mypy.readthedocs.io/en/stable/stubs.html
The text was updated successfully, but these errors were encountered: