mirror of
https://github.com/beetbox/beets.git
synced 2026-01-08 17:08:12 +01:00
Merge pull request #1898 from beetbox/flake8-future-import
Add __future__ import style checker
This commit is contained in:
commit
3fb2185925
18 changed files with 58 additions and 8 deletions
2
beet
2
beet
|
|
@ -15,6 +15,8 @@
|
|||
# The above copyright notice and this permission notice shall be
|
||||
# included in all copies or substantial portions of the Software.
|
||||
|
||||
from __future__ import division, absolute_import, print_function
|
||||
|
||||
import beets.ui
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
|
|||
|
|
@ -17,6 +17,8 @@
|
|||
music and items' embedded album art.
|
||||
"""
|
||||
|
||||
from __future__ import division, absolute_import, print_function
|
||||
|
||||
import subprocess
|
||||
import platform
|
||||
from tempfile import NamedTemporaryFile
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
# Copyright 2016 Bruno Cauet
|
||||
# Split an album-file in tracks thanks a cue file
|
||||
|
||||
from __future__ import division, absolute_import, print_function
|
||||
|
||||
import subprocess
|
||||
from os import path
|
||||
from glob import glob
|
||||
|
|
|
|||
|
|
@ -16,6 +16,8 @@
|
|||
"""Filter imported files using a regular expression.
|
||||
"""
|
||||
|
||||
from __future__ import division, absolute_import, print_function
|
||||
|
||||
import re
|
||||
from beets import config
|
||||
from beets.plugins import BeetsPlugin
|
||||
|
|
|
|||
|
|
@ -14,6 +14,9 @@
|
|||
|
||||
"""Adds support for ipfs. Requires go-ipfs and a running ipfs daemon
|
||||
"""
|
||||
|
||||
from __future__ import division, absolute_import, print_function
|
||||
|
||||
from beets import ui, util, library, config
|
||||
from beets.plugins import BeetsPlugin
|
||||
|
||||
|
|
|
|||
|
|
@ -15,6 +15,9 @@
|
|||
|
||||
"""Synchronize information from music player libraries
|
||||
"""
|
||||
|
||||
from __future__ import division, absolute_import, print_function
|
||||
|
||||
from abc import abstractmethod, ABCMeta
|
||||
from importlib import import_module
|
||||
|
||||
|
|
|
|||
|
|
@ -16,6 +16,8 @@
|
|||
"""Synchronize information from amarok's library via dbus
|
||||
"""
|
||||
|
||||
from __future__ import division, absolute_import, print_function
|
||||
|
||||
from os.path import basename
|
||||
from datetime import datetime
|
||||
from time import mktime
|
||||
|
|
|
|||
|
|
@ -15,6 +15,9 @@
|
|||
|
||||
"""Synchronize information from iTunes's library
|
||||
"""
|
||||
|
||||
from __future__ import division, absolute_import, print_function
|
||||
|
||||
from contextlib import contextmanager
|
||||
import os
|
||||
import shutil
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
from __future__ import division, absolute_import, print_function
|
||||
|
||||
AUTHOR = u'Adrian Sampson'
|
||||
|
||||
# General configuration
|
||||
|
|
|
|||
|
|
@ -1,5 +1,9 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
from __future__ import division, absolute_import, print_function
|
||||
|
||||
from livereload import Server, shell
|
||||
|
||||
server = Server()
|
||||
server.watch('*.rst', shell('make html'))
|
||||
server.serve(root='_build/html')
|
||||
|
|
|
|||
16
setup.cfg
16
setup.cfg
|
|
@ -4,7 +4,15 @@ logging-clear-handlers=1
|
|||
eval-attr="!=slow"
|
||||
|
||||
[flake8]
|
||||
# E241 missing whitespace after ',' (used to align visually)
|
||||
# E221 multiple spaces before operator (used to align visually)
|
||||
# E731 do not assign a lambda expression, use a def
|
||||
ignore=E241,E221,E731
|
||||
# Default pyflakes errors we ignore:
|
||||
# - E241: missing whitespace after ',' (used to align visually)
|
||||
# - E221: multiple spaces before operator (used to align visually)
|
||||
# - E731: do not assign a lambda expression, use a def
|
||||
# `flake8-future-import` errors we ignore:
|
||||
# - FI50: `__future__` import "division" present
|
||||
# - FI51: `__future__` import "absolute_import" present
|
||||
# - FI12: `__future__` import "with_statement" missing
|
||||
# - FI53: `__future__` import "print_function" present
|
||||
# - FI14: `__future__` import "unicode_literals" missing
|
||||
# - FI15: `__future__` import "generator_stop" missing
|
||||
ignore=E241,E221,E731,FI50,FI51,FI12,FI53,FI14,FI15
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Make python -m testall.py work.
|
||||
|
||||
from __future__ import division, absolute_import, print_function
|
||||
|
|
|
|||
|
|
@ -15,17 +15,20 @@
|
|||
|
||||
"""Tests for the `filefilter` plugin.
|
||||
"""
|
||||
|
||||
from __future__ import division, absolute_import, print_function
|
||||
|
||||
import os
|
||||
import shutil
|
||||
|
||||
from _common import unittest
|
||||
from test import _common
|
||||
from test._common import unittest
|
||||
from test.helper import capture_log
|
||||
from test.test_importer import ImportHelper
|
||||
from beets import config
|
||||
from beets.mediafile import MediaFile
|
||||
from beets.util import displayable_path
|
||||
from beetsplug.filefilter import FileFilterPlugin
|
||||
from test import _common
|
||||
from test.helper import capture_log
|
||||
from test.test_importer import ImportHelper
|
||||
|
||||
|
||||
class FileFilterPluginTest(unittest.TestCase, ImportHelper):
|
||||
|
|
|
|||
|
|
@ -12,6 +12,8 @@
|
|||
# The above copyright notice and this permission notice shall be
|
||||
# included in all copies or substantial portions of the Software.
|
||||
|
||||
from __future__ import division, absolute_import, print_function
|
||||
|
||||
from mock import patch
|
||||
|
||||
from beets import library
|
||||
|
|
|
|||
|
|
@ -12,6 +12,9 @@
|
|||
#
|
||||
# The above copyright notice and this permission notice shall be
|
||||
# included in all copies or substantial portions of the Software.
|
||||
|
||||
from __future__ import division, absolute_import, print_function
|
||||
|
||||
import os
|
||||
import platform
|
||||
import time
|
||||
|
|
|
|||
|
|
@ -15,6 +15,9 @@
|
|||
|
||||
"""Test module for file ui/commands.py
|
||||
"""
|
||||
|
||||
from __future__ import division, absolute_import, print_function
|
||||
|
||||
import os
|
||||
import shutil
|
||||
|
||||
|
|
|
|||
|
|
@ -15,6 +15,9 @@
|
|||
|
||||
"""Test module for file ui/__init__.py
|
||||
"""
|
||||
|
||||
from __future__ import division, absolute_import, print_function
|
||||
|
||||
from test import _common
|
||||
from test._common import unittest
|
||||
|
||||
|
|
|
|||
1
tox.ini
1
tox.ini
|
|
@ -47,4 +47,5 @@ commands =
|
|||
[testenv:flake8]
|
||||
deps =
|
||||
flake8
|
||||
flake8-future-import
|
||||
commands = flake8 beets beetsplug beet test setup.py docs
|
||||
|
|
|
|||
Loading…
Reference in a new issue