Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 804f0ea

Browse files
committed
Use new style classes and update super() calls
1 parent bdd07e3 commit 804f0ea

40 files changed

+53
-53
lines changed

auth0/asyncify.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ def __init__(
3131
):
3232
if token is None:
3333
# Wrap the auth client
34-
super(AsyncClient, self).__init__(domain, telemetry, timeout, protocol)
34+
super().__init__(domain, telemetry, timeout, protocol)
3535
else:
3636
# Wrap the mngtmt client
37-
super(AsyncClient, self).__init__(
37+
super().__init__(
3838
domain, token, telemetry, timeout, protocol, rest_options
3939
)
4040
self.client = AsyncRestClient(
@@ -53,10 +53,10 @@ def __init__(
5353
):
5454
if token is None:
5555
# Wrap the auth client
56-
super(Wrapper, self).__init__(domain, telemetry, timeout, protocol)
56+
super().__init__(domain, telemetry, timeout, protocol)
5757
else:
5858
# Wrap the mngtmt client
59-
super(Wrapper, self).__init__(
59+
super().__init__(
6060
domain, token, telemetry, timeout, protocol, rest_options
6161
)
6262

auth0/authentication/async_token_verifier.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class AsyncAsymmetricSignatureVerifier(AsymmetricSignatureVerifier):
1313
"""
1414

1515
def __init__(self, jwks_url, algorithm="RS256"):
16-
super(AsyncAsymmetricSignatureVerifier, self).__init__(jwks_url, algorithm)
16+
super().__init__(jwks_url, algorithm)
1717
self._fetcher = AsyncJwksFetcher(jwks_url)
1818

1919
def set_session(self, session):
@@ -58,7 +58,7 @@ class AsyncJwksFetcher(JwksFetcher):
5858
"""
5959

6060
def __init__(self, *args, **kwargs):
61-
super(AsyncJwksFetcher, self).__init__(*args, **kwargs)
61+
super().__init__(*args, **kwargs)
6262
self._async_client = AsyncRestClient(None)
6363

6464
def set_session(self, session):

auth0/authentication/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
UNKNOWN_ERROR = "a0.sdk.internal.unknown"
66

77

8-
class AuthenticationBase(object):
8+
class AuthenticationBase:
99
"""Base authentication object providing simple REST methods.
1010
1111
Args:

auth0/authentication/token_verifier.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from auth0.exceptions import TokenValidationError
99

1010

11-
class SignatureVerifier(object):
11+
class SignatureVerifier:
1212
"""Abstract class that will verify a given JSON web token's signature
1313
using the key fetched internally given its key id.
1414
@@ -119,7 +119,7 @@ class SymmetricSignatureVerifier(SignatureVerifier):
119119
"""
120120

121121
def __init__(self, shared_secret, algorithm="HS256"):
122-
super(SymmetricSignatureVerifier, self).__init__(algorithm)
122+
super().__init__(algorithm)
123123
self._shared_secret = shared_secret
124124

125125
def _fetch_key(self, key_id=None):
@@ -135,14 +135,14 @@ class AsymmetricSignatureVerifier(SignatureVerifier):
135135
"""
136136

137137
def __init__(self, jwks_url, algorithm="RS256"):
138-
super(AsymmetricSignatureVerifier, self).__init__(algorithm)
138+
super().__init__(algorithm)
139139
self._fetcher = JwksFetcher(jwks_url)
140140

141141
def _fetch_key(self, key_id=None):
142142
return self._fetcher.get_key(key_id)
143143

144144

145-
class JwksFetcher(object):
145+
class JwksFetcher:
146146
"""Class that fetches and holds a JSON web key set.
147147
This class makes use of an in-memory cache. For it to work properly, define this instance once and re-use it.
148148

auth0/authentication/users.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from auth0.rest import RestClient, RestClientOptions
22

33

4-
class Users(object):
4+
class Users:
55
"""Users client.
66
77
Args:

auth0/exceptions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def __str__(self):
1111

1212
class RateLimitError(Auth0Error):
1313
def __init__(self, error_code, message, reset_at):
14-
super(RateLimitError, self).__init__(
14+
super().__init__(
1515
status_code=429, error_code=error_code, message=message
1616
)
1717
self.reset_at = reset_at

auth0/management/actions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from ..rest import RestClient
22

33

4-
class Actions(object):
4+
class Actions:
55
"""Auth0 Actions endpoints
66
77
Args:

auth0/management/async_auth0.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from .auth0 import modules
55

66

7-
class AsyncAuth0(object):
7+
class AsyncAuth0:
88
"""Provides easy access to all endpoint classes
99
1010
Args:

auth0/management/attack_protection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from ..rest import RestClient
22

33

4-
class AttackProtection(object):
4+
class AttackProtection:
55
"""Auth0 attack protection endpoints
66
77
Args:

auth0/management/auth0.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
}
6565

6666

67-
class Auth0(object):
67+
class Auth0:
6868
"""Provides easy access to all endpoint classes
6969
7070
Args:

auth0/management/blacklists.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from ..rest import RestClient
22

33

4-
class Blacklists(object):
4+
class Blacklists:
55
"""Auth0 blacklists endpoints
66
77
Args:

auth0/management/branding.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from ..rest import RestClient
22

33

4-
class Branding(object):
4+
class Branding:
55
"""Auth0 Branding endpoints
66
77
Args:

auth0/management/client_credentials.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from ..rest import RestClient
22

33

4-
class ClientCredentials(object):
4+
class ClientCredentials:
55
"""Auth0 client credentials endpoints.
66
77
Args:

auth0/management/client_grants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from ..rest import RestClient
22

33

4-
class ClientGrants(object):
4+
class ClientGrants:
55
"""Auth0 client grants endpoints
66
77
Args:

auth0/management/clients.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from ..rest import RestClient
22

33

4-
class Clients(object):
4+
class Clients:
55
"""Auth0 applications endpoints
66
77
Args:

auth0/management/connections.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from ..rest import RestClient
22

33

4-
class Connections(object):
4+
class Connections:
55
"""Auth0 connection endpoints
66
77
Args:

auth0/management/custom_domains.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from ..rest import RestClient
22

33

4-
class CustomDomains(object):
4+
class CustomDomains:
55
"""Auth0 custom domains endpoints
66
77
Args:

auth0/management/device_credentials.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from ..rest import RestClient
22

33

4-
class DeviceCredentials(object):
4+
class DeviceCredentials:
55
"""Auth0 connection endpoints
66
77
Args:

auth0/management/email_templates.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from ..rest import RestClient
22

33

4-
class EmailTemplates(object):
4+
class EmailTemplates:
55
"""Auth0 email templates endpoints
66
77
Args:

auth0/management/emails.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from ..rest import RestClient
22

33

4-
class Emails(object):
4+
class Emails:
55
"""Auth0 email endpoints
66
77
Args:

auth0/management/grants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from ..rest import RestClient
22

33

4-
class Grants(object):
4+
class Grants:
55
"""Auth0 grants endpoints
66
77
Args:

auth0/management/guardian.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from ..rest import RestClient
22

33

4-
class Guardian(object):
4+
class Guardian:
55
"""Auth0 guardian endpoints
66
77
Args:

auth0/management/hooks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from ..rest import RestClient
22

33

4-
class Hooks(object):
4+
class Hooks:
55

66
"""Hooks endpoint implementation.
77

auth0/management/jobs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from ..rest import RestClient
44

55

6-
class Jobs(object):
6+
class Jobs:
77
"""Auth0 jobs endpoints
88
99
Args:

auth0/management/log_streams.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from ..rest import RestClient
22

33

4-
class LogStreams(object):
4+
class LogStreams:
55
"""Auth0 log streams endpoints
66
77
Args:

auth0/management/logs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from ..rest import RestClient
22

33

4-
class Logs(object):
4+
class Logs:
55
"""Auth0 logs endpoints
66
77
Args:

auth0/management/organizations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from ..rest import RestClient
22

33

4-
class Organizations(object):
4+
class Organizations:
55
"""Auth0 organizations endpoints
66
77
Args:

auth0/management/prompts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from ..rest import RestClient
22

33

4-
class Prompts(object):
4+
class Prompts:
55
"""Auth0 prompts endpoints
66
77
Args:

auth0/management/resource_servers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from ..rest import RestClient
22

33

4-
class ResourceServers(object):
4+
class ResourceServers:
55
"""Auth0 resource servers endpoints
66
77
Args:

auth0/management/roles.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from ..rest import RestClient
22

33

4-
class Roles(object):
4+
class Roles:
55
"""Auth0 roles endpoints
66
77
Args:

auth0/management/rules.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from ..rest import RestClient
22

33

4-
class Rules(object):
4+
class Rules:
55
"""Rules endpoint implementation.
66
77
Args:

auth0/management/rules_configs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from ..rest import RestClient
22

33

4-
class RulesConfigs(object):
4+
class RulesConfigs:
55
"""RulesConfig endpoint implementation.
66
77
Args:

auth0/management/stats.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from ..rest import RestClient
22

33

4-
class Stats(object):
4+
class Stats:
55
"""Auth0 stats endpoints
66
77
Args:

auth0/management/tenants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from ..rest import RestClient
22

33

4-
class Tenants(object):
4+
class Tenants:
55
"""Auth0 tenants endpoints
66
77
Args:

auth0/management/tickets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from ..rest import RestClient
22

33

4-
class Tickets(object):
4+
class Tickets:
55
"""Auth0 tickets endpoints
66
77
Args:

auth0/management/user_blocks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from ..rest import RestClient
22

33

4-
class UserBlocks(object):
4+
class UserBlocks:
55
"""Auth0 user blocks endpoints
66
77
Args:

auth0/management/users.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from ..rest import RestClient
44

55

6-
class Users(object):
6+
class Users:
77
"""Auth0 users endpoints
88
99
Args:

auth0/management/users_by_email.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from ..rest import RestClient
22

33

4-
class UsersByEmail(object):
4+
class UsersByEmail:
55
"""Auth0 users by email endpoints
66
77
Args:

0 commit comments

Comments
 (0)