auth0-python solve stubtest_allowlist entries (#13827)

This commit is contained in:
Avasam
2025-04-15 08:25:33 -04:00
committed by GitHub
parent 53811d3fca
commit 893eabe4ce
3 changed files with 12 additions and 5 deletions
@@ -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\..*
@@ -1,3 +1,5 @@
from _typeshed import Incomplete
from .token_verifier import AsymmetricSignatureVerifier, JwksFetcher, TokenVerifier
class AsyncAsymmetricSignatureVerifier(AsymmetricSignatureVerifier):
@@ -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]: ...
+3 -1
View File
@@ -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): ...