mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-10-12 09:10:45 +00:00
In '__init__' super method should use static class name (#497)
Currently it is not possible to extend SpotifyClientCredentials and SpotifyOAuth This is because in the class __init__ they refer to 'self.__class__', this leads to an infinite recursion if the parent class doesn't override completely the __init__ method.
This commit is contained in:
1 parent
2e2c7259a9
commit
5c981a1d62
1 file changed
+2
-2
+2
-2
@@ -112,7 +112,7 @@ class SpotifyClientCredentials(SpotifyAuthBase):
|
|||||||
environment variables
|
environment variables
|
||||||
"""
|
"""
|
||||||
|
|
||||||
super(self.__class__, self).__init__(requests_session)
|
super(SpotifyClientCredentials, self).__init__(requests_session)
|
||||||
|
|
||||||
self.client_id = client_id
|
self.client_id = client_id
|
||||||
self.client_secret = client_secret
|
self.client_secret = client_secret
|
||||||
@@ -218,7 +218,7 @@ class SpotifyOAuth(SpotifyAuthBase):
|
|||||||
- username - username of current client
|
- username - username of current client
|
||||||
"""
|
"""
|
||||||
|
|
||||||
super(self.__class__, self).__init__(requests_session)
|
super(SpotifyOAuth, self).__init__(requests_session)
|
||||||
|
|
||||||
self.client_id = client_id
|
self.client_id = client_id
|
||||||
self.client_secret = client_secret
|
self.client_secret = client_secret
|
||||||
|
|||||||
Reference in new issue
Block a user