test: flake8 to ignore camelcase usage in our deps.
Ignore N813 when importing the c version of xml.etree.ElementTree. Ignore N815 when controlling failure diff length in unittest.
This commit is contained in:
parent
84f231af96
commit
5b32f87364
@ -6,9 +6,9 @@ from mopidy.compat import configparser
|
|||||||
from mopidy.internal import validation
|
from mopidy.internal import validation
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import xml.etree.cElementTree as elementtree
|
import xml.etree.cElementTree as elementtree # noqa: N813
|
||||||
except ImportError:
|
except ImportError:
|
||||||
import xml.etree.ElementTree as elementtree
|
import xml.etree.ElementTree as elementtree # noqa: N813
|
||||||
|
|
||||||
|
|
||||||
def parse(data):
|
def parse(data):
|
||||||
|
|||||||
@ -164,7 +164,7 @@ __HASH10__ = foo # = should all be treated as a comment."""
|
|||||||
|
|
||||||
|
|
||||||
class PreProcessorTest(unittest.TestCase):
|
class PreProcessorTest(unittest.TestCase):
|
||||||
maxDiff = None # Show entire diff.
|
maxDiff = None # Show entire diff. # noqa: N815
|
||||||
|
|
||||||
def test_empty_config(self):
|
def test_empty_config(self):
|
||||||
result = config._preprocess('')
|
result = config._preprocess('')
|
||||||
@ -230,7 +230,7 @@ class PreProcessorTest(unittest.TestCase):
|
|||||||
|
|
||||||
|
|
||||||
class PostProcessorTest(unittest.TestCase):
|
class PostProcessorTest(unittest.TestCase):
|
||||||
maxDiff = None # Show entire diff.
|
maxDiff = None # Show entire diff. # noqa: N815
|
||||||
|
|
||||||
def test_empty_config(self):
|
def test_empty_config(self):
|
||||||
result = config._postprocess('[__COMMENTS__]')
|
result = config._postprocess('[__COMMENTS__]')
|
||||||
|
|||||||
@ -497,7 +497,7 @@ class TestCurrentAndPendingTlTrack(BaseTest):
|
|||||||
'mopidy.core.playback.listener.CoreListener', spec=core.CoreListener)
|
'mopidy.core.playback.listener.CoreListener', spec=core.CoreListener)
|
||||||
class EventEmissionTest(BaseTest):
|
class EventEmissionTest(BaseTest):
|
||||||
|
|
||||||
maxDiff = None
|
maxDiff = None # noqa: N815
|
||||||
|
|
||||||
def test_play_when_stopped_emits_events(self, listener_mock):
|
def test_play_when_stopped_emits_events(self, listener_mock):
|
||||||
tl_tracks = self.core.tracklist.get_tl_tracks()
|
tl_tracks = self.core.tracklist.get_tl_tracks()
|
||||||
|
|||||||
@ -237,7 +237,7 @@ class ExpandPathTest(unittest.TestCase):
|
|||||||
|
|
||||||
|
|
||||||
class FindMTimesTest(unittest.TestCase):
|
class FindMTimesTest(unittest.TestCase):
|
||||||
maxDiff = None
|
maxDiff = None # noqa: N815
|
||||||
|
|
||||||
def setUp(self): # noqa: N802
|
def setUp(self): # noqa: N802
|
||||||
self.tmpdir = tempfile.mkdtemp(b'.mopidy-tests')
|
self.tmpdir = tempfile.mkdtemp(b'.mopidy-tests')
|
||||||
|
|||||||
@ -9,7 +9,7 @@ from tests import path_to_data_dir
|
|||||||
|
|
||||||
|
|
||||||
class BrowseCacheTest(unittest.TestCase):
|
class BrowseCacheTest(unittest.TestCase):
|
||||||
maxDiff = None
|
maxDiff = None # noqa: N815
|
||||||
|
|
||||||
def setUp(self): # noqa: N802
|
def setUp(self): # noqa: N802
|
||||||
self.uris = ['local:track:foo/bar/song1',
|
self.uris = ['local:track:foo/bar/song1',
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user