-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Added annotation for five functions in Authlib #14800
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
Spider84pr
wants to merge
41
commits into
python:main
Choose a base branch
from
Spider84pr:auth
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 13 commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
21e12c7
Added annotation for five functions in Authlib
Spider84pr 84bcf4f
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 57fa61c
Added annotation for remaining two functions
Spider84pr 514d619
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 8025584
Merge branch 'python:main' into auth
Spider84pr c17df44
Added "type: ignore[import-untyped]" to pass mypytest
Spider84pr 8addbd3
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 8af2d45
Changed library for requests from requests to authx
Spider84pr 42348ad
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] a36b99d
Added authx library to dependencies
Spider84pr 5d71ad7
Merge branch 'auth' of github.com:Spider84pr/typeshed into auth
Spider84pr fe8f5f0
Added authx library to dependencies
Spider84pr 9f0ed4e
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 736414c
Update stubs/Authlib/authlib/integrations/base_client/async_app.pyi
Spider84pr 210f1f5
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 6e406b4
Added authx library to dependencies
Spider84pr ce035d2
Added annotations to kwargs for all functions
Spider84pr dd1416f
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 6858213
Merge branch 'main' of github.com:Spider84pr/typeshed into auth
Spider84pr e368db3
Fixed annotations to kwargs for all functions
Spider84pr f8ceb98
Fixed annotations to kwargs for all functions
Spider84pr c50be52
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 65acd6c
Update stubs/Authlib/METADATA.toml
sobolevn 4b771bf
Trying to fix stubtest. Remove httpx entry from entries from stubs/Au…
Spider84pr c2469c0
Revert "Update stubs/Authlib/METADATA.toml"
Spider84pr 405cb7e
Trying to fix stubtest. add entry in METADATA.toml
Spider84pr c1b465b
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 3280a42
added back @tests/.#stubtest_allowlist.txt
Spider84pr 51db573
Trying to fix stubtest. add entry in METADATA.toml
Spider84pr 186e0e4
Merge branch 'auth' of github.com:Spider84pr/typeshed into auth
Spider84pr 8b1a45d
Trying to fix stubtest. add entry in METADATA.toml
Spider84pr 4428ef8
Trying to fix stubtest. add entry in requirements-tests.txt
Spider84pr 94e23c4
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 3665c2b
Trying to fix stubtest. Corrected METADATA.toml
Spider84pr 52f27aa
Merge branch 'auth' of github.com:Spider84pr/typeshed into auth
Spider84pr ebaf5ae
Trying to fix stubtest. Corrected METADATA.toml
Spider84pr 2ce8939
Trying to fix stubtest. remove my changes in requirements-tests.txt
Spider84pr bc140cc
Merge branch 'main' of github.com:Spider84pr/typeshed into auth
Spider84pr 99a15db
Added entries from stubs/Authlib/@tests/stubtest_allowlist.txt
Spider84pr 7b83007
Added TODO comment stubs/Authlib/@tests/stubtest_allowlist.txt
Spider84pr 5060bd8
Update stubs/Authlib/@tests/stubtest_allowlist.txt
Spider84pr 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
Some comments aren't visible on the classic Files Changed page.
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,4 +1,4 @@ | ||
version = "~= 1.6.4" | ||
upstream_repository = "https://github.com/lepture/authlib" | ||
requires = ["cryptography"] | ||
requires = ["cryptography", "types-httpx"] | ||
partial_stub = true |
16 changes: 9 additions & 7 deletions
16
stubs/Authlib/authlib/integrations/base_client/async_app.pyi
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,18 +1,20 @@ | ||
from logging import Logger | ||
from typing import Any | ||
|
||
import httpx | ||
from authlib.integrations.base_client.sync_app import OAuth1Base, OAuth2Base | ||
|
||
log: Logger | ||
|
||
__all__ = ["AsyncOAuth1Mixin", "AsyncOAuth2Mixin"] | ||
|
||
class AsyncOAuth1Mixin(OAuth1Base): | ||
async def request(self, method, url, token=None, **kwargs): ... | ||
async def create_authorization_url(self, redirect_uri=None, **kwargs): ... | ||
async def fetch_access_token(self, request_token=None, **kwargs): ... | ||
async def request(self, method: str, url: str, token: dict[str, Any] | None = None, **kwargs) -> httpx.Response: ... | ||
async def create_authorization_url(self, redirect_uri: str | None = None, **kwargs) -> dict[str, Any]: ... | ||
async def fetch_access_token(self, request_token: dict[str, Any] | None = None, **kwargs) -> dict[str, Any]: ... | ||
|
||
class AsyncOAuth2Mixin(OAuth2Base): | ||
async def load_server_metadata(self): ... | ||
async def request(self, method, url, token=None, **kwargs): ... | ||
async def create_authorization_url(self, redirect_uri=None, **kwargs): ... | ||
async def fetch_access_token(self, redirect_uri=None, **kwargs): ... | ||
async def load_server_metadata(self) -> dict[str, Any]: ... | ||
async def request(self, method: str, url: str, token: dict[str, Any] | None = None, **kwargs) -> httpx.Response: ... | ||
|
||
async def create_authorization_url(self, redirect_uri: str | None = None, **kwargs) -> dict[str, Any]: ... | ||
async def fetch_access_token(self, redirect_uri: str | None = None, **kwargs) -> dict[str, Any]: ... | ||
Spider84pr marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, add
httpx
to https://github.com/python/typeshed/blob/main/stubs/Authlib/METADATA.toml#L3