Skip to content

Conversation

@o-santi
Copy link
Contributor

@o-santi o-santi commented Oct 29, 2025

What kind of change does this PR introduce?

Fix typing definitions for auth, enough for mypy to accept them.

Additional context

Most of the changes were to remove _request's callback parameter, xform, because it is much more difficult to type it correctly than to just run the function manually. It also simplifies the code for a later refactor on sync/async.

Most of the helper tests also had to be changed, because they override model_validate and make the function accept any invalid data passed in. Some things still need to change, like the manual URL concatenation, or the multiple Anys, but that's coming in a future rewrite.

@o-santi o-santi force-pushed the auth/fix-mypy-errors branch from ab8842b to a546736 Compare October 29, 2025 13:53
@o-santi o-santi requested a review from grdsdev October 29, 2025 17:13
@o-santi o-santi requested a review from silentworks October 29, 2025 17:15
@coveralls
Copy link

coveralls commented Oct 29, 2025

Pull Request Test Coverage Report for Build 18916340641

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 318 unchanged lines in 16 files lost coverage.
  • Overall coverage decreased (-1.2%) to 92.703%

Files with Coverage Reduction New Missed Lines %
tests/test_helpers.py 2 98.92%
src/supabase_auth/types.py 3 98.65%
tests/_sync/test_gotrue.py 3 99.03%
tests/_sync/test_gotrue_admin_api.py 3 98.83%
src/supabase_auth/_async/gotrue_base_api.py 3 91.89%
tests/_async/test_gotrue.py 3 99.03%
src/supabase_auth/_sync/gotrue_base_api.py 3 91.89%
src/supabase_auth/_sync/gotrue_admin_api.py 5 90.91%
tests/_async/test_gotrue_admin_api.py 5 98.05%
src/supabase_auth/_async/gotrue_admin_api.py 5 90.91%
Totals Coverage Status
Change from base Build 18888484625: -1.2%
Covered Lines: 8512
Relevant Lines: 9182

💛 - Coveralls

@o-santi o-santi merged commit 5c07a73 into main Oct 30, 2025
12 checks passed
@o-santi o-santi deleted the auth/fix-mypy-errors branch October 30, 2025 14:41
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.

5 participants