flake8: Fix new warnings from flake8 2.4.0
This commit is contained in:
parent
b34bcd0f58
commit
52a035d217
@ -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():
|
||||
|
||||
4
tasks.py
4
tasks.py
@ -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()
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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"')
|
||||
|
||||
Loading…
Reference in New Issue
Block a user