Skip to content

fix(types): add full mypy --strict typing to transport requests and init modules (#1508) #1721

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cureprotocols
Copy link

This PR contributes to #1508 by fully annotating the following modules to support mypy --strict compatibility:

✅ Files Updated

  • google/auth/transport/__init__.py – fully typed abstract base classes for Request and Response
  • google/auth/transport/requests.py – concrete implementation with strict typing

📌 Highlights

  • All functions and methods include explicit return type annotations
  • Deprecated @abc.abstractproperty replaced with @property + @abc.abstractmethod
  • __call__() in Request interface now explicitly typed
  • All mypy strict errors resolved, including:
    • Line 53: missing return on status
    • Line 58: missing return on headers
    • Line 63: missing return on __call__
    • Line 78: untyped helper function

✅ Verified

mypy --strict google/auth/transport/__init__.py
mypy --strict google/auth/transport/requests.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy