Skip to content
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

Improve type hints #1401

Merged
merged 2 commits into from
Jul 14, 2024
Merged

Improve type hints #1401

merged 2 commits into from
Jul 14, 2024

Conversation

sashkent3
Copy link
Contributor

@sashkent3 sashkent3 commented Jun 26, 2024

This PR improves type hints by:

  • adding type parameters to fastapi_users.authentication.authenticator.Authenticator
  • passing through type parameters to fastapi_users.authentication.backend.AuthenticationBackend in several places where they were missing
  • adding Any type hints to fastapi_users.authentication.authenticator.Authenticator.current_user and fastapi_users.authentication.authenticator.Authenticator.current_user_token.

Closes #1400

@sashkent3 sashkent3 changed the title Add type parameters to AuthenticationBackend Improve type-hints Jun 27, 2024
@sashkent3 sashkent3 changed the title Improve type-hints Improve type hints Jun 27, 2024
Copy link

codecov bot commented Jul 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (6ac64ad) to head (2f85edb).

Additional details and impacted files
@@            Coverage Diff            @@
##            master     #1401   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           35        35           
  Lines          970       970           
=========================================
  Hits           970       970           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@frankie567 frankie567 merged commit abfa9a1 into fastapi-users:master Jul 14, 2024
15 checks passed
@frankie567
Copy link
Member

Thank you!

@all-contributors add @sashkent3 for code

Copy link
Contributor

@frankie567

I've put up a pull request to add @sashkent3! 🎉

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.

AuthenticationBackend lacks type parameters inside FastAPIUsers
2 participants