Fix new flake8 warnings
This commit is contained in:
parent
caa60f33f5
commit
99d8a2124e
@ -15,7 +15,7 @@ try:
|
|||||||
except ImportError:
|
except ImportError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
import pykka.debug
|
import pykka.debug # noqa: I100
|
||||||
|
|
||||||
from mopidy import commands, config as config_lib, ext
|
from mopidy import commands, config as config_lib, ext
|
||||||
from mopidy.internal import encoding, log, path, process, versioning
|
from mopidy.internal import encoding, log, path, process, versioning
|
||||||
|
|||||||
@ -8,7 +8,6 @@ import os
|
|||||||
import pykka
|
import pykka
|
||||||
|
|
||||||
import mopidy
|
import mopidy
|
||||||
|
|
||||||
from mopidy import audio, backend, mixer
|
from mopidy import audio, backend, mixer
|
||||||
from mopidy.audio import PlaybackState
|
from mopidy.audio import PlaybackState
|
||||||
from mopidy.core.history import HistoryController
|
from mopidy.core.history import HistoryController
|
||||||
|
|||||||
@ -7,7 +7,6 @@ import re
|
|||||||
import sys
|
import sys
|
||||||
|
|
||||||
import mopidy
|
import mopidy
|
||||||
|
|
||||||
from mopidy import compat, local, models
|
from mopidy import compat, local, models
|
||||||
from mopidy.internal import storage as internal_storage
|
from mopidy.internal import storage as internal_storage
|
||||||
from mopidy.internal import timer
|
from mopidy.internal import timer
|
||||||
|
|||||||
@ -34,7 +34,7 @@ def replace(path, mode='w+b', encoding=None, errors=None):
|
|||||||
(fd, tempname) = tempfile.mkstemp(dir=os.path.dirname(path))
|
(fd, tempname) = tempfile.mkstemp(dir=os.path.dirname(path))
|
||||||
try:
|
try:
|
||||||
fp = io.open(fd, mode, encoding=encoding, errors=errors)
|
fp = io.open(fd, mode, encoding=encoding, errors=errors)
|
||||||
except:
|
except Exception:
|
||||||
os.remove(tempname)
|
os.remove(tempname)
|
||||||
os.close(fd)
|
os.close(fd)
|
||||||
raise
|
raise
|
||||||
@ -43,7 +43,7 @@ def replace(path, mode='w+b', encoding=None, errors=None):
|
|||||||
fp.flush()
|
fp.flush()
|
||||||
os.fsync(fd)
|
os.fsync(fd)
|
||||||
os.rename(tempname, path)
|
os.rename(tempname, path)
|
||||||
except:
|
except Exception:
|
||||||
os.remove(tempname)
|
os.remove(tempname)
|
||||||
raise
|
raise
|
||||||
finally:
|
finally:
|
||||||
|
|||||||
@ -10,10 +10,10 @@ import mock
|
|||||||
import pykka
|
import pykka
|
||||||
|
|
||||||
import mopidy
|
import mopidy
|
||||||
|
|
||||||
from mopidy.core import Core
|
from mopidy.core import Core
|
||||||
from mopidy.internal import models, storage, versioning
|
from mopidy.internal import models, storage, versioning
|
||||||
from mopidy.models import Track
|
from mopidy.models import Track
|
||||||
|
|
||||||
from tests import dummy_mixer
|
from tests import dummy_mixer
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -8,6 +8,7 @@ import pykka
|
|||||||
|
|
||||||
from mopidy import core, mixer
|
from mopidy import core, mixer
|
||||||
from mopidy.internal.models import MixerState
|
from mopidy.internal.models import MixerState
|
||||||
|
|
||||||
from tests import dummy_mixer
|
from tests import dummy_mixer
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user