Linting of core subpackage + clean up imports (#437)

* Linting of OAuth2 mod. + update tests to detect core package path

* Tweak imports in tests + update tox ini to ignore Flake8 E501 error

* Tweak tox ini - ignore examples

* Remove `f`-string from OAuth2 mod.

* More import tweaks in core package + tests

* Update flake8 config. in tox ini - set line length limit to 99 chars.
This commit is contained in:
S Murthy authored and GitHub committed 2020-02-09 12:59:20 +00:00
1 parent c22ba27cf1
commit 3b0e8febc4
6 files changed
+13 -13

No files matched your search

+1 -2
View File
@@ -219,8 +219,7 @@ class AuthTestSpotipy(unittest.TestCase):
with self.assertRaises(SpotifyException) as cm:
self.spotify.user_playlist_create(
"spotify", "Best hits of the 90s")
self.assertTrue(cm.exception.http_status == 401 or
cm.exception.http_status == 403)
self.assertTrue(cm.exception.http_status == 401 or cm.exception.http_status == 403)
def test_custom_requests_session(self):
sess = requests.Session()
+3 -3
View File
@@ -11,17 +11,17 @@ following environment variables
'SPOTIPY_CLIENT_SECRET'
'SPOTIPY_REDIRECT_URI'
"""
from __future__ import print_function
import os
import sys
from spotipy import (
CLIENT_CREDS_ENV_VARS as CCEV,
prompt_for_user_token,
Spotify,
SpotifyException,
)
import os
import sys
import unittest
import warnings
import requests