Skip to content

fix(types): fully strict-type jwt module with safe formatting and decoding (#1508) #1723

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 typing the google/auth/jwt.py module using mypy --strict.

✅ Highlights:

  • Full type annotations added to all public methods and classes
  • Proper handling of byte-to-string conversion in error formatting
  • Replaced f-strings with .format() to comply with --strict mode
  • Explicit str casts where required to eliminate str-bytes-safe warnings
  • # type: ignore used only where necessary (MalformedError, _helpers)
  • Removed deprecated # type: ignore lines and updated Mapping fallback

🧪 Verified With:

mypy --strict google/auth/jwt.py

@cureprotocols cureprotocols requested review from a team as code owners April 3, 2025 17:33
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