lint: Workaround and fix to account for new version of flake8

This commit is contained in:
Thomas Adamcik 2016-07-25 21:09:38 +02:00
parent 068800c699
commit c199fb1c81
4 changed files with 9 additions and 5 deletions

View File

@ -5,7 +5,7 @@ import os
import signal import signal
import sys import sys
from mopidy.internal.gi import Gst # noqa: Import to initialize from mopidy.internal.gi import Gst # noqa: F401
try: try:
# Make GObject's mainloop the event loop for python-dbus # Make GObject's mainloop the event loop for python-dbus

View File

@ -9,12 +9,15 @@ import re
from mopidy import compat from mopidy import compat
from mopidy.compat import configparser from mopidy.compat import configparser
from mopidy.config import keyring from mopidy.config import keyring
from mopidy.config.schemas import * # noqa from mopidy.config.schemas import *
from mopidy.config.types import * # noqa from mopidy.config.types import *
from mopidy.internal import path, versioning from mopidy.internal import path, versioning
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
# flake8: noqa:
# TODO: Update this to be flake8 compliant
_core_schema = ConfigSchema('core') _core_schema = ConfigSchema('core')
_core_schema['cache_dir'] = Path() _core_schema['cache_dir'] = Path()
_core_schema['config_dir'] = Path() _core_schema['config_dir'] = Path()

View File

@ -2,7 +2,7 @@ from __future__ import absolute_import, unicode_literals
import unittest import unittest
from mopidy.models.fields import * # noqa: F403 from mopidy.models.fields import Collection, Field, Integer, String
def create_instance(field): def create_instance(field):

View File

@ -37,7 +37,8 @@ commands = sphinx-build -b html -d {envtmpdir}/doctrees . {envtmpdir}/html
[testenv:flake8] [testenv:flake8]
deps = deps =
flake8 flake8
flake8-import-order # TODO: Re-enable once https://github.com/PyCQA/flake8-import-order/issues/79 is released.
# flake8-import-order
pep8-naming pep8-naming
commands = flake8 --show-source --statistics mopidy tests commands = flake8 --show-source --statistics mopidy tests