-
-
Notifications
You must be signed in to change notification settings - Fork 378
fix(auth): mypy auth #1282
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
Merged
Merged
fix(auth): mypy auth #1282
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
1abf8c7
chore: use pydantic to parse jwt, instead of json.loads
o-santi cd0cffa
chore: partial commit, more fixes
o-santi a546736
fix: more changes
o-santi be54c73
fix: more changes
o-santi 90fc4e2
fix: fix all tests
o-santi 010bd7f
chore: fix all tests and make all typing definitions pass
o-santi 2e3f592
chore: remove leftover print
o-santi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,32 +1,57 @@ | ||
| tests: pytest | ||
| help:: | ||
| @echo "Available commands" | ||
| @echo " help -- (default) print this message" | ||
|
|
||
| tests: mypy pytest | ||
| help:: | ||
| @echo " tests -- run all tests for supabase_auth" | ||
|
|
||
| pytest: start-infra | ||
| uv run --package supabase_auth pytest --cov=./ --cov-report=xml --cov-report=html -vv | ||
|
|
||
| mypy: | ||
| uv run --package supabase_auth mypy src/supabase_auth tests | ||
| help:: | ||
| @echo " mypy -- run mypy on supabase_auth" | ||
|
|
||
| start-infra: | ||
| cd infra &&\ | ||
| docker compose down &&\ | ||
| docker compose up -d | ||
| sleep 2 | ||
| help:: | ||
| @echo " start-infra -- start containers for tests" | ||
|
|
||
| clean-infra: | ||
| cd infra &&\ | ||
| docker compose down --remove-orphans &&\ | ||
| docker system prune -a --volumes -f | ||
| help:: | ||
| @echo " clean-infra -- delete all stored information about the containers" | ||
|
|
||
| stop-infra: | ||
| cd infra &&\ | ||
| docker compose down --remove-orphans | ||
| help:: | ||
| @echo " stop-infra -- stop containers for tests" | ||
|
|
||
| sync-infra: | ||
| uv run --package supabase_auth scripts/gh-download.py --repo=supabase/gotrue-js --branch=master --folder=infra | ||
| help:: | ||
| @echo " sync-infra -- update locked versions for test containers" | ||
|
|
||
| build-sync: | ||
| uv run --package supabase_auth scripts/run-unasync.py | ||
| help:: | ||
| @echo " build-sync -- generate _sync from _async code" | ||
|
|
||
| clean: | ||
| rm -rf htmlcov .pytest_cache .mypy_cache .ruff_cache | ||
| rm -f .coverage coverage.xml | ||
| help:: | ||
| @echo " clean -- clean intermediary files" | ||
|
|
||
| build: | ||
| uv build --package supabase_auth | ||
| help:: | ||
| @echo " build -- invoke uv build on supabase_auth package" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,16 +1,16 @@ | ||
| from __future__ import annotations | ||
|
|
||
| from ._async.gotrue_admin_api import AsyncGoTrueAdminAPI # type: ignore # noqa: F401 | ||
| from ._async.gotrue_client import AsyncGoTrueClient # type: ignore # noqa: F401 | ||
| from ._async.gotrue_admin_api import AsyncGoTrueAdminAPI | ||
| from ._async.gotrue_client import AsyncGoTrueClient | ||
| from ._async.storage import ( | ||
| AsyncMemoryStorage, # type: ignore # noqa: F401 | ||
| AsyncSupportedStorage, # type: ignore # noqa: F401 | ||
| AsyncMemoryStorage, | ||
| AsyncSupportedStorage, | ||
| ) | ||
| from ._sync.gotrue_admin_api import SyncGoTrueAdminAPI # type: ignore # noqa: F401 | ||
| from ._sync.gotrue_client import SyncGoTrueClient # type: ignore # noqa: F401 | ||
| from ._sync.gotrue_admin_api import SyncGoTrueAdminAPI | ||
| from ._sync.gotrue_client import SyncGoTrueClient | ||
| from ._sync.storage import ( | ||
| SyncMemoryStorage, # type: ignore # noqa: F401 | ||
| SyncSupportedStorage, # type: ignore # noqa: F401 | ||
| SyncMemoryStorage, | ||
| SyncSupportedStorage, | ||
| ) | ||
| from .types import * # type: ignore # noqa: F401, F403 | ||
| from .types import * | ||
| from .version import __version__ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.