Merge pull request #231 from pylast/fix-code-inspection
Fix some PyCharm code inspection things
This commit is contained in:
commit
ad24b8910b
|
@ -3,7 +3,6 @@ pyLast
|
||||||
|
|
||||||
[](https://travis-ci.org/pylast/pylast)
|
[](https://travis-ci.org/pylast/pylast)
|
||||||
[](https://pypi.python.org/pypi/pylast/)
|
[](https://pypi.python.org/pypi/pylast/)
|
||||||
<!--[](https://pypi.python.org/pypi/pylast/)-->
|
|
||||||
[](https://codecov.io/gh/pylast/pylast)
|
[](https://codecov.io/gh/pylast/pylast)
|
||||||
[](https://coveralls.io/github/pylast/pylast?branch=develop)
|
[](https://coveralls.io/github/pylast/pylast?branch=develop)
|
||||||
[](https://landscape.io/github/hugovk/pylast/develop)
|
[](https://landscape.io/github/hugovk/pylast/develop)
|
||||||
|
|
|
@ -244,7 +244,7 @@ class _Network(object):
|
||||||
"""
|
"""
|
||||||
Returns an (API_KEY, API_SECRET, SESSION_KEY) tuple.
|
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):
|
def _delay_call(self):
|
||||||
"""
|
"""
|
||||||
|
|
4
setup.py
4
setup.py
|
@ -8,8 +8,8 @@ setup(
|
||||||
author="Amr Hassan <amr.hassan@gmail.com>",
|
author="Amr Hassan <amr.hassan@gmail.com>",
|
||||||
install_requires=['six'],
|
install_requires=['six'],
|
||||||
tests_require=['mock', 'pytest', 'coverage', 'pycodestyle', 'pyyaml',
|
tests_require=['mock', 'pytest', 'coverage', 'pycodestyle', 'pyyaml',
|
||||||
'pyflakes'],
|
'pyflakes', 'flaky'],
|
||||||
description=("A Python interface to Last.fm and Libre.fm"),
|
description="A Python interface to Last.fm and Libre.fm",
|
||||||
author_email="amr.hassan@gmail.com",
|
author_email="amr.hassan@gmail.com",
|
||||||
url="https://github.com/pylast/pylast",
|
url="https://github.com/pylast/pylast",
|
||||||
classifiers=[
|
classifiers=[
|
||||||
|
|
|
@ -174,7 +174,7 @@ class TestPyLastNetwork(PyLastTestCase):
|
||||||
|
|
||||||
# Act
|
# Act
|
||||||
stringed = str(thing)
|
stringed = str(thing)
|
||||||
repr = thing.__repr__()
|
rep = thing.__repr__()
|
||||||
title = thing.get_title()
|
title = thing.get_title()
|
||||||
name = thing.get_name()
|
name = thing.get_name()
|
||||||
playcount = thing.get_playcount()
|
playcount = thing.get_playcount()
|
||||||
|
@ -182,7 +182,7 @@ class TestPyLastNetwork(PyLastTestCase):
|
||||||
|
|
||||||
# Assert
|
# Assert
|
||||||
self.assertEqual(stringed, "Test Artist - Test Album")
|
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.assertEqual(title, name)
|
||||||
self.assertIsInstance(playcount, int)
|
self.assertIsInstance(playcount, int)
|
||||||
self.assertGreater(playcount, 1)
|
self.assertGreater(playcount, 1)
|
||||||
|
@ -195,7 +195,7 @@ class TestPyLastNetwork(PyLastTestCase):
|
||||||
|
|
||||||
# Act
|
# Act
|
||||||
stringed = str(thing)
|
stringed = str(thing)
|
||||||
repr = thing.__repr__()
|
rep = thing.__repr__()
|
||||||
title = thing.get_title()
|
title = thing.get_title()
|
||||||
name = thing.get_name()
|
name = thing.get_name()
|
||||||
playcount = thing.get_playcount()
|
playcount = thing.get_playcount()
|
||||||
|
@ -203,7 +203,7 @@ class TestPyLastNetwork(PyLastTestCase):
|
||||||
|
|
||||||
# Assert
|
# Assert
|
||||||
self.assertEqual(stringed, "Test Artist - test title")
|
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, "test title")
|
||||||
self.assertEqual(title, name)
|
self.assertEqual(title, name)
|
||||||
self.assertIsInstance(playcount, int)
|
self.assertIsInstance(playcount, int)
|
||||||
|
@ -275,6 +275,7 @@ class TestPyLastNetwork(PyLastTestCase):
|
||||||
|
|
||||||
def test_init_with_token(self):
|
def test_init_with_token(self):
|
||||||
# Arrange/Act
|
# Arrange/Act
|
||||||
|
msg = None
|
||||||
try:
|
try:
|
||||||
pylast.LastFMNetwork(
|
pylast.LastFMNetwork(
|
||||||
api_key=self.__class__.secrets["api_key"],
|
api_key=self.__class__.secrets["api_key"],
|
||||||
|
|
|
@ -239,6 +239,7 @@ class TestPyLastUser(PyLastTestCase):
|
||||||
|
|
||||||
def helper_get_assert_charts(self, thing, date):
|
def helper_get_assert_charts(self, thing, date):
|
||||||
# Arrange
|
# Arrange
|
||||||
|
album_chart, track_chart = None, None
|
||||||
(from_date, to_date) = date
|
(from_date, to_date) = date
|
||||||
|
|
||||||
# Act
|
# Act
|
||||||
|
|
Loading…
Reference in a new issue