Skip to content

Commit

Permalink
Removed inheritance from object
Browse files Browse the repository at this point in the history
No longer required with Python 3
  • Loading branch information
smithdc1 committed Sep 15, 2020
1 parent 88d22e8 commit 25b5af2
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion oauth2_provider/backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
OAuthLibCore = get_oauthlib_core()


class OAuth2Backend(object):
class OAuth2Backend:
"""
Authenticate against an OAuth2 access token
"""
Expand Down
2 changes: 1 addition & 1 deletion oauth2_provider/generators.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from .settings import oauth2_settings


class BaseHashGenerator(object):
class BaseHashGenerator:
"""
All generators should extend this class overriding `.hash()` method.
"""
Expand Down
2 changes: 1 addition & 1 deletion oauth2_provider/oauth2_backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from .settings import oauth2_settings


class OAuthLibCore(object):
class OAuthLibCore:
"""
Wrapper for oauth Server providing django-specific interfaces.
Expand Down
2 changes: 1 addition & 1 deletion oauth2_provider/scopes.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from .settings import oauth2_settings


class BaseScopes(object):
class BaseScopes:
def get_all_scopes(self):
"""
Return a dict-like object with all the scopes available in the
Expand Down
2 changes: 1 addition & 1 deletion oauth2_provider/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def import_from_string(val, setting_name):
raise ImportError(msg)


class OAuth2ProviderSettings(object):
class OAuth2ProviderSettings:
"""
A settings object, that allows OAuth2 Provider settings to be accessed as properties.
Expand Down
4 changes: 2 additions & 2 deletions oauth2_provider/views/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
SAFE_HTTP_METHODS = ["GET", "HEAD", "OPTIONS"]


class OAuthLibMixin(object):
class OAuthLibMixin:
"""
This mixin decouples Django OAuth Toolkit from OAuthLib.
Expand Down Expand Up @@ -195,7 +195,7 @@ def authenticate_client(self, request):
return core.authenticate_client(request)


class ScopedResourceMixin(object):
class ScopedResourceMixin:
"""
Helper mixin that implements "scopes handling" behaviour
"""
Expand Down
2 changes: 1 addition & 1 deletion tests/test_mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class TestView(OAuthLibMixin, View):
self.assertIsInstance(test_view.get_server(), Server)

def test_custom_backend(self):
class AnotherOauthLibBackend(object):
class AnotherOauthLibBackend:
pass

class TestView(OAuthLibMixin, View):
Expand Down

0 comments on commit 25b5af2

Please sign in to comment.