flake8: Fix new warnings from flake8 2.4.0

This commit is contained in:
Stein Magnus Jodal 2018-12-02 00:28:25 +01:00
parent b34bcd0f58
commit 52a035d217
4 changed files with 8 additions and 8 deletions

View File

@ -38,7 +38,7 @@ def load_protocol_modules():
def INT(value): # noqa: N802
"""Converts a value that matches [+-]?\d+ into and integer."""
r"""Converts a value that matches [+-]?\d+ into and integer."""
if value is None:
raise ValueError('None is not a valid integer')
# TODO: check for whitespace via value != value.strip()?
@ -46,7 +46,7 @@ def INT(value): # noqa: N802
def UINT(value): # noqa: N802
"""Converts a value that matches \d+ into an integer."""
r"""Converts a value that matches \d+ into an integer."""
if value is None:
raise ValueError('None is not a valid integer')
if not value.isdigit():

View File

@ -42,7 +42,7 @@ def watcher(task, *args, **kwargs):
task(*args, **kwargs)
try:
run(
'inotifywait -q -e create -e modify -e delete '
'--exclude ".*\.(pyc|sw.)" -r docs/ mopidy/ tests/')
r'inotifywait -q -e create -e modify -e delete '
r'--exclude ".*\.(pyc|sw.)" -r docs/ mopidy/ tests/')
except KeyboardInterrupt:
sys.exit()

View File

@ -23,7 +23,7 @@ class IsA(object):
try:
return isinstance(rhs, self.klass)
except TypeError:
return type(rhs) == type(self.klass) # flake8: noqa
return type(rhs) == type(self.klass) # noqa
def __ne__(self, rhs):
return not self.__eq__(rhs)

View File

@ -161,7 +161,7 @@ class IssueGH69RegressionTest(protocol.BaseTestCase):
class IssueGH113RegressionTest(protocol.BaseTestCase):
"""
r"""
The issue: https://github.com/mopidy/mopidy/issues/113
How to reproduce:
@ -174,11 +174,11 @@ class IssueGH113RegressionTest(protocol.BaseTestCase):
def test(self):
self.core.playlists.create(
u'all lart spotify:track:\w\{22\} pastes')
r'all lart spotify:track:\w\{22\} pastes')
self.send_request('lsinfo "/"')
self.assertInResponse(
u'playlist: all lart spotify:track:\w\{22\} pastes')
r'playlist: all lart spotify:track:\w\{22\} pastes')
self.send_request(
r'listplaylistinfo "all lart spotify:track:\\w\\{22\\} pastes"')