Skip to content

Commit 295c065

Browse files
authored
Removed inheritance from object (#863)
No longer required with Python 3
1 parent 88d22e8 commit 295c065

File tree

7 files changed

+8
-8
lines changed

7 files changed

+8
-8
lines changed

oauth2_provider/backends.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
OAuthLibCore = get_oauthlib_core()
88

99

10-
class OAuth2Backend(object):
10+
class OAuth2Backend:
1111
"""
1212
Authenticate against an OAuth2 access token
1313
"""

oauth2_provider/generators.py

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

66

7-
class BaseHashGenerator(object):
7+
class BaseHashGenerator:
88
"""
99
All generators should extend this class overriding `.hash()` method.
1010
"""

oauth2_provider/oauth2_backends.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from .settings import oauth2_settings
1010

1111

12-
class OAuthLibCore(object):
12+
class OAuthLibCore:
1313
"""
1414
Wrapper for oauth Server providing django-specific interfaces.
1515

oauth2_provider/scopes.py

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

33

4-
class BaseScopes(object):
4+
class BaseScopes:
55
def get_all_scopes(self):
66
"""
77
Return a dict-like object with all the scopes available in the

oauth2_provider/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ def import_from_string(val, setting_name):
157157
raise ImportError(msg)
158158

159159

160-
class OAuth2ProviderSettings(object):
160+
class OAuth2ProviderSettings:
161161
"""
162162
A settings object, that allows OAuth2 Provider settings to be accessed as properties.
163163

oauth2_provider/views/mixins.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
SAFE_HTTP_METHODS = ["GET", "HEAD", "OPTIONS"]
1414

1515

16-
class OAuthLibMixin(object):
16+
class OAuthLibMixin:
1717
"""
1818
This mixin decouples Django OAuth Toolkit from OAuthLib.
1919
@@ -195,7 +195,7 @@ def authenticate_client(self, request):
195195
return core.authenticate_client(request)
196196

197197

198-
class ScopedResourceMixin(object):
198+
class ScopedResourceMixin:
199199
"""
200200
Helper mixin that implements "scopes handling" behaviour
201201
"""

tests/test_mixins.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class TestView(OAuthLibMixin, View):
5858
self.assertIsInstance(test_view.get_server(), Server)
5959

6060
def test_custom_backend(self):
61-
class AnotherOauthLibBackend(object):
61+
class AnotherOauthLibBackend:
6262
pass
6363

6464
class TestView(OAuthLibMixin, View):

0 commit comments

Comments
 (0)