Skip to content

Commit 4360c60

Browse files
authored
Merge pull request #467 from Viicos/drop-python2-syntax
2 parents bdd07e3 + 4f0458c commit 4360c60

86 files changed

Lines changed: 101 additions & 147 deletions

Some content is hidden

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

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 & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@ def __str__(self):
1111

1212
class RateLimitError(Auth0Error):
1313
def __init__(self, error_code, message, reset_at):
14-
super(RateLimitError, self).__init__(
15-
status_code=429, error_code=error_code, message=message
16-
)
14+
super().__init__(status_code=429, error_code=error_code, message=message)
1715
self.reset_at = reset_at
1816

1917

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:

0 commit comments

Comments
 (0)