From c601d2f365323290bbb94a62ddec0daab8fd4a39 Mon Sep 17 00:00:00 2001 From: hugovk Date: Tue, 24 Oct 2017 00:54:34 +0300 Subject: [PATCH 1/2] Fix minor things from code inspection --- pylast/__init__.py | 2 +- setup.py | 4 ++-- tests/test_pylast_network.py | 9 +++++---- tests/test_pylast_user.py | 1 + 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/pylast/__init__.py b/pylast/__init__.py index 1dc7547..96ca64b 100644 --- a/pylast/__init__.py +++ b/pylast/__init__.py @@ -244,7 +244,7 @@ class _Network(object): """ Returns an (API_KEY, API_SECRET, SESSION_KEY) tuple. """ - return (self.api_key, self.api_secret, self.session_key) + return self.api_key, self.api_secret, self.session_key def _delay_call(self): """ diff --git a/setup.py b/setup.py index 2d9375c..2a0de0d 100755 --- a/setup.py +++ b/setup.py @@ -8,8 +8,8 @@ setup( author="Amr Hassan ", install_requires=['six'], tests_require=['mock', 'pytest', 'coverage', 'pycodestyle', 'pyyaml', - 'pyflakes'], - description=("A Python interface to Last.fm and Libre.fm"), + 'pyflakes', 'flaky'], + description="A Python interface to Last.fm and Libre.fm", author_email="amr.hassan@gmail.com", url="https://github.com/pylast/pylast", classifiers=[ diff --git a/tests/test_pylast_network.py b/tests/test_pylast_network.py index 2906b92..23d2f20 100755 --- a/tests/test_pylast_network.py +++ b/tests/test_pylast_network.py @@ -174,7 +174,7 @@ class TestPyLastNetwork(PyLastTestCase): # Act stringed = str(thing) - repr = thing.__repr__() + rep = thing.__repr__() title = thing.get_title() name = thing.get_name() playcount = thing.get_playcount() @@ -182,7 +182,7 @@ class TestPyLastNetwork(PyLastTestCase): # Assert self.assertEqual(stringed, "Test Artist - Test Album") - self.assertIn("pylast.Album('Test Artist', 'Test Album',", repr) + self.assertIn("pylast.Album('Test Artist', 'Test Album',", rep) self.assertEqual(title, name) self.assertIsInstance(playcount, int) self.assertGreater(playcount, 1) @@ -195,7 +195,7 @@ class TestPyLastNetwork(PyLastTestCase): # Act stringed = str(thing) - repr = thing.__repr__() + rep = thing.__repr__() title = thing.get_title() name = thing.get_name() playcount = thing.get_playcount() @@ -203,7 +203,7 @@ class TestPyLastNetwork(PyLastTestCase): # Assert self.assertEqual(stringed, "Test Artist - test title") - self.assertIn("pylast.Track('Test Artist', 'test title',", repr) + self.assertIn("pylast.Track('Test Artist', 'test title',", rep) self.assertEqual(title, "test title") self.assertEqual(title, name) self.assertIsInstance(playcount, int) @@ -275,6 +275,7 @@ class TestPyLastNetwork(PyLastTestCase): def test_init_with_token(self): # Arrange/Act + msg = None try: pylast.LastFMNetwork( api_key=self.__class__.secrets["api_key"], diff --git a/tests/test_pylast_user.py b/tests/test_pylast_user.py index 66beb40..1169f41 100755 --- a/tests/test_pylast_user.py +++ b/tests/test_pylast_user.py @@ -239,6 +239,7 @@ class TestPyLastUser(PyLastTestCase): def helper_get_assert_charts(self, thing, date): # Arrange + album_chart, track_chart = None, None (from_date, to_date) = date # Act From b2f58fde636cf422b356ba320fb19694ef4766bd Mon Sep 17 00:00:00 2001 From: hugovk Date: Tue, 24 Oct 2017 00:57:33 +0300 Subject: [PATCH 2/2] Remove commented-out, broken downloads badge --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 8e55b29..87e259e 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,6 @@ pyLast [![Build status](https://travis-ci.org/pylast/pylast.svg?branch=develop)](https://travis-ci.org/pylast/pylast) [![PyPI version](https://img.shields.io/pypi/v/pylast.svg)](https://pypi.python.org/pypi/pylast/) - [![Coverage (Codecov)](https://codecov.io/gh/pylast/pylast/branch/develop/graph/badge.svg)](https://codecov.io/gh/pylast/pylast) [![Coverage (Coveralls)](https://coveralls.io/repos/github/pylast/pylast/badge.svg?branch=develop)](https://coveralls.io/github/pylast/pylast?branch=develop) [![Code health](https://landscape.io/github/pylast/pylast/develop/landscape.svg)](https://landscape.io/github/hugovk/pylast/develop)