Skip to content

Add typing mypy #15988

Closed
Closed

Description

@jaketf

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

Activity

  1. added
    api: storage
    on Nov 17, 2020
  2. added
    triage me
    🚨
    on Nov 18, 2020
  3. added
    type: feature request
    and removed
    🚨
    triage me
    on Nov 23, 2020
  4. added a commit that references this issue on Jan 23, 2026
  5. chalmerlowe commented on Mar 2, 2026

    @chalmerlowe
    Contributor

    This issue was moved from the following repo as part of the monorepo migration: googleapis/python-storage

  6. parthea commented on Apr 28, 2026

    @parthea
    Contributor

    The work to add mypy for google-cloud-storage is now tracked in #16014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    api: storagetype: feature request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions