Fix flake8 warnings

This commit is contained in:
Stein Magnus Jodal 2013-04-13 00:28:45 +02:00
parent 2730dccecd
commit 6076a0f117
5 changed files with 12 additions and 9 deletions

View File

@ -154,8 +154,8 @@ class Scanner(object):
self.fakesink.connect('handoff', self.process_handoff)
self.uribin = gst.element_factory_make('uridecodebin')
self.uribin.set_property('caps',
gst.Caps(b'audio/x-raw-int; audio/x-raw-float'))
self.uribin.set_property(
'caps', gst.Caps(b'audio/x-raw-int; audio/x-raw-float'))
self.uribin.connect('pad-added', self.process_new_pad)
self.pipe = gst.element_factory_make('pipeline')

View File

@ -253,7 +253,8 @@ class ExpandedPath(bytes):
class Path(ConfigValue):
"""File system path that will be expanded with mopidy.utils.path.expand_path
"""File system path that will be expanded with
mopidy.utils.path.expand_path
Supports: optional, choices and secret.
"""
@ -275,9 +276,9 @@ class ConfigSchema(object):
"""Logical group of config values that correspond to a config section.
Schemas are set up by assigning config keys with config values to
instances. Once setup :meth:`convert` can be called with a list of
``(key, value)`` tuples to process. For convienience we also support
:meth:`format` method that can used for printing out the converted values.
instances. Once setup :meth:`convert` can be called with a list of ``(key,
value)`` tuples to process. For convienience we also support :meth:`format`
method that can used for printing out the converted values.
"""
# TODO: Use collections.OrderedDict once 2.6 support is gone (#344)
def __init__(self):

View File

@ -3,7 +3,7 @@ from __future__ import unicode_literals
import logging
import logging.handlers
from . import deps, versioning
from . import versioning
def setup_logging(config, verbosity_level, save_debug_log):

View File

@ -29,7 +29,8 @@ class ExceptionsTest(unittest.TestCase):
exceptions.ConfigError, exceptions.MopidyException))
def test_config_error_provides_getitem(self):
exception = exceptions.ConfigError({'field1': 'msg1', 'field2': 'msg2'})
exception = exceptions.ConfigError(
{'field1': 'msg1', 'field2': 'msg2'})
self.assertEqual('msg1', exception['field1'])
self.assertEqual('msg2', exception['field2'])
self.assertItemsEqual(['field1', 'field2'], exception)

View File

@ -441,7 +441,8 @@ class LogLevelConfigSchemaTest(unittest.TestCase):
def test_format(self):
schema = config.LogLevelConfigSchema()
expected = ['[levels]', 'baz = info', 'foo.bar = debug']
result = schema.format('levels', {'foo.bar': logging.DEBUG, 'baz': logging.INFO})
result = schema.format(
'levels', {'foo.bar': logging.DEBUG, 'baz': logging.INFO})
self.assertEqual('\n'.join(expected), result)