Skip to content

auth0-python solve stubtest_allowlist entries #13827

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
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions stubs/auth0-python/@tests/stubtest_allowlist.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Omit tests
auth0\.test.*

# Omit _async functions because they aren't present in the code
# Omit _async functions because they aren't present at runtime
# The way these stubs are currently implemented is that we pretend all classes have async methods
# Even though in reality, users need to call `auth0.asyncify.asyncify` to generate async subclasses
auth0\..*_async

# Inconsistently implemented, ommitted
auth0.management.Auth0\..*
auth0.rest_async.AsyncRestClient.file_post
auth0.authentication.async_token_verifier.AsyncTokenVerifier.verify
auth0\.management\.Auth0\..*
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from _typeshed import Incomplete

from .token_verifier import AsymmetricSignatureVerifier, JwksFetcher, TokenVerifier

class AsyncAsymmetricSignatureVerifier(AsymmetricSignatureVerifier):
Expand All @@ -17,3 +19,6 @@ class AsyncTokenVerifier(TokenVerifier):
self, signature_verifier: AsyncAsymmetricSignatureVerifier, issuer: str, audience: str, leeway: int = 0
) -> None: ...
def set_session(self, session) -> None: ...
async def verify( # type: ignore[override] # Differs from supertype
self, token: str, nonce: str | None = None, max_age: int | None = None, organization: str | None = None
) -> dict[str, Incomplete]: ...
4 changes: 3 additions & 1 deletion stubs/auth0-python/auth0/rest_async.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ class AsyncRestClient(RestClient):
def set_session(self, session) -> None: ...
async def get(self, url: str, params: dict[str, Incomplete] | None = None, headers: dict[str, str] | None = None): ...
async def post(self, url: str, data: RequestData | None = None, headers: dict[str, str] | None = None): ...
async def file_post(self, *args, **kwargs): ...
async def file_post( # type: ignore[override] # Differs from supertype
self, url: str, data: dict[str, Incomplete], files: dict[str, Incomplete]
): ...
async def patch(self, url: str, data: RequestData | None = None): ...
async def put(self, url: str, data: RequestData | None = None): ...
async def delete(self, url: str, params: dict[str, Incomplete] | None = None, data: RequestData | None = None): ...
Expand Down