Fix new flake8 warnings

This commit is contained in:
Stein Magnus Jodal 2018-03-29 10:21:50 +02:00
parent caa60f33f5
commit 99d8a2124e
6 changed files with 5 additions and 6 deletions

View File

@ -15,7 +15,7 @@ try:
except ImportError:
pass
import pykka.debug
import pykka.debug # noqa: I100
from mopidy import commands, config as config_lib, ext
from mopidy.internal import encoding, log, path, process, versioning

View File

@ -8,7 +8,6 @@ import os
import pykka
import mopidy
from mopidy import audio, backend, mixer
from mopidy.audio import PlaybackState
from mopidy.core.history import HistoryController

View File

@ -7,7 +7,6 @@ import re
import sys
import mopidy
from mopidy import compat, local, models
from mopidy.internal import storage as internal_storage
from mopidy.internal import timer

View File

@ -34,7 +34,7 @@ def replace(path, mode='w+b', encoding=None, errors=None):
(fd, tempname) = tempfile.mkstemp(dir=os.path.dirname(path))
try:
fp = io.open(fd, mode, encoding=encoding, errors=errors)
except:
except Exception:
os.remove(tempname)
os.close(fd)
raise
@ -43,7 +43,7 @@ def replace(path, mode='w+b', encoding=None, errors=None):
fp.flush()
os.fsync(fd)
os.rename(tempname, path)
except:
except Exception:
os.remove(tempname)
raise
finally:

View File

@ -10,10 +10,10 @@ import mock
import pykka
import mopidy
from mopidy.core import Core
from mopidy.internal import models, storage, versioning
from mopidy.models import Track
from tests import dummy_mixer

View File

@ -8,6 +8,7 @@ import pykka
from mopidy import core, mixer
from mopidy.internal.models import MixerState
from tests import dummy_mixer