Skip to content

Commit 53811d3

Browse files
authored
auth0-python: Cleanup re-exports leftovers from stubgen (#13828)
1 parent fd155cb commit 53811d3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+184
-218
lines changed

stubs/auth0-python/@tests/stubtest_allowlist.txt

-7
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,6 @@ auth0\.test.*
55
auth0\..*_async
66

77
# Inconsistently implemented, ommitted
8-
auth0.asyncify.AsyncRestClient.file_post
9-
auth0.authentication.async_token_verifier.AsyncRestClient.file_post
108
auth0.management.Auth0\..*
119
auth0.rest_async.AsyncRestClient.file_post
1210
auth0.authentication.async_token_verifier.AsyncTokenVerifier.verify
13-
14-
# TYPE_CHECKING override makes these show up wrong
15-
auth0.management.async_auth0.RestClientOptions
16-
auth0.management.auth0.RestClientOptions
17-
auth0.rest.RequestsResponse

stubs/auth0-python/auth0/__init__.pyi

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
from auth0.exceptions import (
2-
Auth0Error as Auth0Error,
3-
RateLimitError as RateLimitError,
4-
TokenValidationError as TokenValidationError,
5-
)
1+
from auth0.exceptions import Auth0Error, RateLimitError, TokenValidationError
62

73
__all__ = ("Auth0Error", "RateLimitError", "TokenValidationError")

stubs/auth0-python/auth0/asyncify.pyi

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
from auth0.authentication import Users as Users
2-
from auth0.authentication.base import AuthenticationBase as AuthenticationBase
3-
from auth0.rest import RestClientOptions as RestClientOptions
4-
from auth0.rest_async import AsyncRestClient as AsyncRestClient
1+
from typing import TypeVar
52

6-
def asyncify(cls): ...
3+
_T = TypeVar("_T")
4+
5+
# See note in stubs/auth0-python/@tests/stubtest_allowlist.txt about _async methods
6+
def asyncify(cls: type[_T]) -> type[_T]: ...
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
from .database import Database as Database
2-
from .delegated import Delegated as Delegated
3-
from .enterprise import Enterprise as Enterprise
4-
from .get_token import GetToken as GetToken
5-
from .passwordless import Passwordless as Passwordless
6-
from .revoke_token import RevokeToken as RevokeToken
7-
from .social import Social as Social
8-
from .users import Users as Users
1+
from .database import Database
2+
from .delegated import Delegated
3+
from .enterprise import Enterprise
4+
from .get_token import GetToken
5+
from .passwordless import Passwordless
6+
from .revoke_token import RevokeToken
7+
from .social import Social
8+
from .users import Users
99

1010
__all__ = ("Database", "Delegated", "Enterprise", "GetToken", "Passwordless", "RevokeToken", "Social", "Users")

stubs/auth0-python/auth0/authentication/async_token_verifier.pyi

+1-7
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
1-
from .. import TokenValidationError as TokenValidationError
2-
from ..rest_async import AsyncRestClient as AsyncRestClient
3-
from .token_verifier import (
4-
AsymmetricSignatureVerifier as AsymmetricSignatureVerifier,
5-
JwksFetcher as JwksFetcher,
6-
TokenVerifier as TokenVerifier,
7-
)
1+
from .token_verifier import AsymmetricSignatureVerifier, JwksFetcher, TokenVerifier
82

93
class AsyncAsymmetricSignatureVerifier(AsymmetricSignatureVerifier):
104
def __init__(self, jwks_url: str, algorithm: str = "RS256") -> None: ...
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from .base import AuthenticationBase as AuthenticationBase
1+
from .base import AuthenticationBase
22

33
class BackChannelLogin(AuthenticationBase):
44
def back_channel_login(self, binding_message: str, login_hint: str, scope: str, **kwargs): ...

stubs/auth0-python/auth0/authentication/base.pyi

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
from _typeshed import Incomplete
22
from typing import Final
33

4-
from auth0.rest import RestClient as RestClient, RestClientOptions as RestClientOptions
5-
from auth0.types import RequestData as RequestData
6-
7-
from .client_authentication import add_client_authentication as add_client_authentication
4+
from auth0.rest import RestClient
5+
from auth0.types import RequestData
86

97
UNKNOWN_ERROR: Final[str]
108

stubs/auth0-python/auth0/authentication/database.pyi

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from _typeshed import Incomplete
22

3-
from .base import AuthenticationBase as AuthenticationBase
3+
from .base import AuthenticationBase
44

55
class Database(AuthenticationBase):
66
def signup(

stubs/auth0-python/auth0/authentication/delegated.pyi

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from .base import AuthenticationBase as AuthenticationBase
1+
from .base import AuthenticationBase
22

33
class Delegated(AuthenticationBase):
44
def get_token(

stubs/auth0-python/auth0/authentication/enterprise.pyi

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from .base import AuthenticationBase as AuthenticationBase
1+
from .base import AuthenticationBase
22

33
class Enterprise(AuthenticationBase):
44
def saml_metadata(self): ...

stubs/auth0-python/auth0/authentication/get_token.pyi

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from .base import AuthenticationBase as AuthenticationBase
1+
from .base import AuthenticationBase
22

33
class GetToken(AuthenticationBase):
44
def authorization_code(self, code: str, redirect_uri: str | None, grant_type: str = "authorization_code"): ...

stubs/auth0-python/auth0/authentication/passwordless.pyi

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from .base import AuthenticationBase as AuthenticationBase
1+
from .base import AuthenticationBase
22

33
class Passwordless(AuthenticationBase):
44
def email(self, email: str, send: str = "link", auth_params: dict[str, str] | None = None): ...
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from .base import AuthenticationBase as AuthenticationBase
1+
from .base import AuthenticationBase
22

33
class PushedAuthorizationRequests(AuthenticationBase):
44
def pushed_authorization_request(self, response_type: str, redirect_uri: str, **kwargs): ...
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from .base import AuthenticationBase as AuthenticationBase
1+
from .base import AuthenticationBase
22

33
class RevokeToken(AuthenticationBase):
44
def revoke_refresh_token(self, token: str): ...
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from .base import AuthenticationBase as AuthenticationBase
1+
from .base import AuthenticationBase
22

33
class Social(AuthenticationBase):
44
def login(self, access_token: str, connection: str, scope: str = "openid"): ...

stubs/auth0-python/auth0/authentication/token_verifier.pyi

-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
from _typeshed import Incomplete
22
from typing import ClassVar
33

4-
from auth0.exceptions import TokenValidationError as TokenValidationError
5-
64
class SignatureVerifier:
75
DISABLE_JWT_CHECKS: ClassVar[dict[str, bool]]
86
def __init__(self, algorithm: str) -> None: ...

stubs/auth0-python/auth0/authentication/users.pyi

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from _typeshed import Incomplete
22

3-
from auth0.rest import RestClient as RestClient, RestClientOptions as RestClientOptions
4-
from auth0.types import TimeoutType as TimeoutType
3+
from auth0.rest import RestClient
4+
from auth0.types import TimeoutType
55

66
class Users:
77
domain: str

stubs/auth0-python/auth0/management/__init__.pyi

+30-30
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
1-
from .actions import Actions as Actions
2-
from .attack_protection import AttackProtection as AttackProtection
3-
from .auth0 import Auth0 as Auth0
4-
from .blacklists import Blacklists as Blacklists
5-
from .branding import Branding as Branding
6-
from .client_credentials import ClientCredentials as ClientCredentials
7-
from .client_grants import ClientGrants as ClientGrants
8-
from .clients import Clients as Clients
9-
from .connections import Connections as Connections
10-
from .custom_domains import CustomDomains as CustomDomains
11-
from .device_credentials import DeviceCredentials as DeviceCredentials
12-
from .email_templates import EmailTemplates as EmailTemplates
13-
from .emails import Emails as Emails
14-
from .grants import Grants as Grants
15-
from .guardian import Guardian as Guardian
16-
from .hooks import Hooks as Hooks
17-
from .jobs import Jobs as Jobs
18-
from .log_streams import LogStreams as LogStreams
19-
from .logs import Logs as Logs
20-
from .organizations import Organizations as Organizations
21-
from .resource_servers import ResourceServers as ResourceServers
22-
from .roles import Roles as Roles
23-
from .rules import Rules as Rules
24-
from .rules_configs import RulesConfigs as RulesConfigs
25-
from .stats import Stats as Stats
26-
from .tenants import Tenants as Tenants
27-
from .tickets import Tickets as Tickets
28-
from .user_blocks import UserBlocks as UserBlocks
29-
from .users import Users as Users
30-
from .users_by_email import UsersByEmail as UsersByEmail
1+
from .actions import Actions
2+
from .attack_protection import AttackProtection
3+
from .auth0 import Auth0
4+
from .blacklists import Blacklists
5+
from .branding import Branding
6+
from .client_credentials import ClientCredentials
7+
from .client_grants import ClientGrants
8+
from .clients import Clients
9+
from .connections import Connections
10+
from .custom_domains import CustomDomains
11+
from .device_credentials import DeviceCredentials
12+
from .email_templates import EmailTemplates
13+
from .emails import Emails
14+
from .grants import Grants
15+
from .guardian import Guardian
16+
from .hooks import Hooks
17+
from .jobs import Jobs
18+
from .log_streams import LogStreams
19+
from .logs import Logs
20+
from .organizations import Organizations
21+
from .resource_servers import ResourceServers
22+
from .roles import Roles
23+
from .rules import Rules
24+
from .rules_configs import RulesConfigs
25+
from .stats import Stats
26+
from .tenants import Tenants
27+
from .tickets import Tickets
28+
from .user_blocks import UserBlocks
29+
from .users import Users
30+
from .users_by_email import UsersByEmail
3131

3232
__all__ = (
3333
"Auth0",

stubs/auth0-python/auth0/management/actions.pyi

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from _typeshed import Incomplete
22

3-
from ..rest import RestClient as RestClient, RestClientOptions as RestClientOptions
4-
from ..types import TimeoutType as TimeoutType
3+
from ..rest import RestClientOptions
4+
from ..types import TimeoutType
55

66
class Actions:
77
domain: Incomplete

stubs/auth0-python/auth0/management/async_auth0.pyi

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
from types import TracebackType
22
from typing_extensions import Self
33

4-
from auth0.rest import RestClientOptions as RestClientOptions
5-
6-
from ..asyncify import asyncify as asyncify
7-
from .auth0 import Auth0 as Auth0
4+
from auth0.rest import RestClientOptions
85

96
class AsyncAuth0:
107
def __init__(self, domain: str, token: str, rest_options: RestClientOptions | None = None) -> None: ...

stubs/auth0-python/auth0/management/attack_protection.pyi

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from _typeshed import Incomplete
22

3-
from ..rest import RestClient as RestClient, RestClientOptions as RestClientOptions
4-
from ..types import TimeoutType as TimeoutType
3+
from ..rest import RestClientOptions
4+
from ..types import TimeoutType
55

66
class AttackProtection:
77
domain: Incomplete
+61-63
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,65 @@
1-
from _typeshed import Incomplete
1+
from auth0.rest import RestClientOptions
22

3-
from auth0.rest import RestClientOptions as RestClientOptions
4-
5-
from .actions import Actions as Actions
6-
from .attack_protection import AttackProtection as AttackProtection
7-
from .blacklists import Blacklists as Blacklists
8-
from .branding import Branding as Branding
9-
from .client_credentials import ClientCredentials as ClientCredentials
10-
from .client_grants import ClientGrants as ClientGrants
11-
from .clients import Clients as Clients
12-
from .connections import Connections as Connections
13-
from .custom_domains import CustomDomains as CustomDomains
14-
from .device_credentials import DeviceCredentials as DeviceCredentials
15-
from .email_templates import EmailTemplates as EmailTemplates
16-
from .emails import Emails as Emails
17-
from .grants import Grants as Grants
18-
from .guardian import Guardian as Guardian
19-
from .hooks import Hooks as Hooks
20-
from .jobs import Jobs as Jobs
21-
from .log_streams import LogStreams as LogStreams
22-
from .logs import Logs as Logs
23-
from .organizations import Organizations as Organizations
24-
from .prompts import Prompts as Prompts
25-
from .resource_servers import ResourceServers as ResourceServers
26-
from .roles import Roles as Roles
27-
from .rules import Rules as Rules
28-
from .rules_configs import RulesConfigs as RulesConfigs
29-
from .stats import Stats as Stats
30-
from .tenants import Tenants as Tenants
31-
from .tickets import Tickets as Tickets
32-
from .user_blocks import UserBlocks as UserBlocks
33-
from .users import Users as Users
34-
from .users_by_email import UsersByEmail as UsersByEmail
3+
from .actions import Actions
4+
from .attack_protection import AttackProtection
5+
from .blacklists import Blacklists
6+
from .branding import Branding
7+
from .client_credentials import ClientCredentials
8+
from .client_grants import ClientGrants
9+
from .clients import Clients
10+
from .connections import Connections
11+
from .custom_domains import CustomDomains
12+
from .device_credentials import DeviceCredentials
13+
from .email_templates import EmailTemplates
14+
from .emails import Emails
15+
from .grants import Grants
16+
from .guardian import Guardian
17+
from .hooks import Hooks
18+
from .jobs import Jobs
19+
from .log_streams import LogStreams
20+
from .logs import Logs
21+
from .organizations import Organizations
22+
from .prompts import Prompts
23+
from .resource_servers import ResourceServers
24+
from .roles import Roles
25+
from .rules import Rules
26+
from .rules_configs import RulesConfigs
27+
from .stats import Stats
28+
from .tenants import Tenants
29+
from .tickets import Tickets
30+
from .user_blocks import UserBlocks
31+
from .users import Users
32+
from .users_by_email import UsersByEmail
3533

3634
class Auth0:
37-
actions: Incomplete
38-
attack_protection: Incomplete
39-
blacklists: Incomplete
40-
branding: Incomplete
41-
client_credentials: Incomplete
42-
client_grants: Incomplete
43-
clients: Incomplete
44-
connections: Incomplete
45-
custom_domains: Incomplete
46-
device_credentials: Incomplete
47-
email_templates: Incomplete
48-
emails: Incomplete
49-
grants: Incomplete
50-
guardian: Incomplete
51-
hooks: Incomplete
52-
jobs: Incomplete
53-
log_streams: Incomplete
54-
logs: Incomplete
55-
organizations: Incomplete
56-
prompts: Incomplete
57-
resource_servers: Incomplete
58-
roles: Incomplete
59-
rules_configs: Incomplete
60-
rules: Incomplete
61-
stats: Incomplete
62-
tenants: Incomplete
63-
tickets: Incomplete
64-
user_blocks: Incomplete
65-
users_by_email: Incomplete
66-
users: Incomplete
35+
actions: Actions
36+
attack_protection: AttackProtection
37+
blacklists: Blacklists
38+
branding: Branding
39+
client_credentials: ClientCredentials
40+
client_grants: ClientGrants
41+
clients: Clients
42+
connections: Connections
43+
custom_domains: CustomDomains
44+
device_credentials: DeviceCredentials
45+
email_templates: EmailTemplates
46+
emails: Emails
47+
grants: Grants
48+
guardian: Guardian
49+
hooks: Hooks
50+
jobs: Jobs
51+
log_streams: LogStreams
52+
logs: Logs
53+
organizations: Organizations
54+
prompts: Prompts
55+
resource_servers: ResourceServers
56+
roles: Roles
57+
rules_configs: RulesConfigs
58+
rules: Rules
59+
stats: Stats
60+
tenants: Tenants
61+
tickets: Tickets
62+
user_blocks: UserBlocks
63+
users_by_email: UsersByEmail
64+
users: Users
6765
def __init__(self, domain: str, token: str, rest_options: RestClientOptions | None = None) -> None: ...

stubs/auth0-python/auth0/management/blacklists.pyi

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from _typeshed import Incomplete
22

3-
from ..rest import RestClient as RestClient, RestClientOptions as RestClientOptions
4-
from ..types import TimeoutType as TimeoutType
3+
from ..rest import RestClientOptions
4+
from ..types import TimeoutType
55

66
class Blacklists:
77
url: Incomplete

stubs/auth0-python/auth0/management/branding.pyi

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from _typeshed import Incomplete
22

3-
from ..rest import RestClient as RestClient, RestClientOptions as RestClientOptions
4-
from ..types import TimeoutType as TimeoutType
3+
from ..rest import RestClientOptions
4+
from ..types import TimeoutType
55

66
class Branding:
77
domain: Incomplete

0 commit comments

Comments
 (0)