diff --git a/stubs/auth0-python/@tests/stubtest_allowlist.txt b/stubs/auth0-python/@tests/stubtest_allowlist.txt index e83dc7be660e..374bc1d561b6 100644 --- a/stubs/auth0-python/@tests/stubtest_allowlist.txt +++ b/stubs/auth0-python/@tests/stubtest_allowlist.txt @@ -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\..* diff --git a/stubs/auth0-python/auth0/authentication/async_token_verifier.pyi b/stubs/auth0-python/auth0/authentication/async_token_verifier.pyi index 27064c21b5f2..5b18760b06b2 100644 --- a/stubs/auth0-python/auth0/authentication/async_token_verifier.pyi +++ b/stubs/auth0-python/auth0/authentication/async_token_verifier.pyi @@ -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]: ... diff --git a/stubs/auth0-python/auth0/rest_async.pyi b/stubs/auth0-python/auth0/rest_async.pyi index e3f5c5be615b..56dc43e76804 100644 --- a/stubs/auth0-python/auth0/rest_async.pyi +++ b/stubs/auth0-python/auth0/rest_async.pyi @@ -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): ...