mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-06-19 09:13:53 +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:
parent
2e2c7259a9
commit
5c981a1d62
@ -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
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user