Use __future__ imports but unicode_literals everywhere

Include import of __future__ features division, absolute_imports and
print_function everywhere. Don't add unicode_literals yet for it is
harder to convert.

Goal is smoothing the transition to python 3.
This commit is contained in:
Bruno Cauet 2015-01-19 12:16:05 +01:00
parent 2902cda036
commit 90b388b775
119 changed files with 239 additions and 18 deletions

View file

@ -12,6 +12,8 @@
# The above copyright notice and this permission notice shall be # The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software. # included in all copies or substantial portions of the Software.
from __future__ import division, absolute_import, print_function
__version__ = '1.3.11' __version__ = '1.3.11'
__author__ = 'Adrian Sampson <adrian@radbox.org>' __author__ = 'Adrian Sampson <adrian@radbox.org>'

View file

@ -15,6 +15,8 @@
"""Facilities for automatically determining files' correct metadata. """Facilities for automatically determining files' correct metadata.
""" """
from __future__ import division, absolute_import, print_function
from beets import logging from beets import logging
from beets import config from beets import config

View file

@ -13,6 +13,8 @@
# included in all copies or substantial portions of the Software. # included in all copies or substantial portions of the Software.
"""Glue between metadata sources and the matching logic.""" """Glue between metadata sources and the matching logic."""
from __future__ import division, absolute_import, print_function
from collections import namedtuple from collections import namedtuple
import re import re

View file

@ -15,7 +15,8 @@
"""Matches existing metadata with canonical information to identify """Matches existing metadata with canonical information to identify
releases and tracks. releases and tracks.
""" """
from __future__ import division
from __future__ import division, absolute_import, print_function
import datetime import datetime
import re import re

View file

@ -14,6 +14,8 @@
"""Searches for albums in the MusicBrainz database. """Searches for albums in the MusicBrainz database.
""" """
from __future__ import division, absolute_import, print_function
import musicbrainzngs import musicbrainzngs
import re import re
import traceback import traceback

View file

@ -15,6 +15,8 @@
"""DBCore is an abstract database package that forms the basis for beets' """DBCore is an abstract database package that forms the basis for beets'
Library. Library.
""" """
from __future__ import division, absolute_import, print_function
from .db import Model, Database from .db import Model, Database
from .query import Query, FieldQuery, MatchQuery, AndQuery, OrQuery from .query import Query, FieldQuery, MatchQuery, AndQuery, OrQuery
from .types import Type from .types import Type

View file

@ -14,6 +14,8 @@
"""The central Model and Database constructs for DBCore. """The central Model and Database constructs for DBCore.
""" """
from __future__ import division, absolute_import, print_function
import time import time
import os import os
from collections import defaultdict from collections import defaultdict

View file

@ -14,6 +14,8 @@
"""The Query type hierarchy for DBCore. """The Query type hierarchy for DBCore.
""" """
from __future__ import division, absolute_import, print_function
import re import re
from operator import attrgetter from operator import attrgetter
from beets import util from beets import util

View file

@ -14,6 +14,8 @@
"""Parsing of strings into DBCore queries. """Parsing of strings into DBCore queries.
""" """
from __future__ import division, absolute_import, print_function
import re import re
import itertools import itertools
from . import query from . import query

View file

@ -14,6 +14,8 @@
"""Representation of type information for DBCore model fields. """Representation of type information for DBCore model fields.
""" """
from __future__ import division, absolute_import, print_function
from . import query from . import query
from beets.util import str2bool from beets.util import str2bool

View file

@ -12,10 +12,11 @@
# The above copyright notice and this permission notice shall be # The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software. # included in all copies or substantial portions of the Software.
from __future__ import division, absolute_import, print_function
"""Provides the basic, interface-agnostic workflow for importing and """Provides the basic, interface-agnostic workflow for importing and
autotagging music files. autotagging music files.
""" """
from __future__ import print_function
import os import os
import re import re

View file

@ -14,6 +14,8 @@
"""The core data store and collection logic for beets. """The core data store and collection logic for beets.
""" """
from __future__ import division, absolute_import, print_function
import os import os
import sys import sys
import shlex import shlex

View file

@ -20,7 +20,8 @@ that when getLogger(name) instantiates a logger that logger uses
{}-style formatting. {}-style formatting.
""" """
from __future__ import absolute_import from __future__ import division, absolute_import, print_function
from copy import copy from copy import copy
from logging import * # noqa from logging import * # noqa
import sys import sys

View file

@ -32,6 +32,8 @@ Internally ``MediaFile`` uses ``MediaField`` descriptors to access the
data from the tags. In turn ``MediaField`` uses a number of data from the tags. In turn ``MediaField`` uses a number of
``StorageStyle`` strategies to handle format specific logic. ``StorageStyle`` strategies to handle format specific logic.
""" """
from __future__ import division, absolute_import, print_function
import mutagen import mutagen
import mutagen.mp3 import mutagen.mp3
import mutagen.oggopus import mutagen.oggopus

View file

@ -14,6 +14,8 @@
"""Support for beets plugins.""" """Support for beets plugins."""
from __future__ import division, absolute_import, print_function
import traceback import traceback
import inspect import inspect
import re import re

View file

@ -16,7 +16,8 @@
interface. To invoke the CLI, just call beets.ui.main(). The actual interface. To invoke the CLI, just call beets.ui.main(). The actual
CLI commands are implemented in the ui.commands module. CLI commands are implemented in the ui.commands module.
""" """
from __future__ import print_function
from __future__ import division, absolute_import, print_function
import locale import locale
import optparse import optparse

View file

@ -15,7 +15,8 @@
"""This module provides the default commands for beets' command-line """This module provides the default commands for beets' command-line
interface. interface.
""" """
from __future__ import print_function
from __future__ import division, absolute_import, print_function
import os import os
import platform import platform

View file

@ -13,7 +13,8 @@
# included in all copies or substantial portions of the Software. # included in all copies or substantial portions of the Software.
"""Miscellaneous utility functions.""" """Miscellaneous utility functions."""
from __future__ import division
from __future__ import division, absolute_import, print_function
import os import os
import sys import sys

View file

@ -15,6 +15,8 @@
"""Abstraction layer to resize images using PIL, ImageMagick, or a """Abstraction layer to resize images using PIL, ImageMagick, or a
public resizing proxy if neither is available. public resizing proxy if neither is available.
""" """
from __future__ import division, absolute_import, print_function
import urllib import urllib
import subprocess import subprocess
import os import os

View file

@ -5,6 +5,8 @@ asyncore.
Bluelet: easy concurrency without all the messy parallelism. Bluelet: easy concurrency without all the messy parallelism.
""" """
from __future__ import division, absolute_import, print_function
import socket import socket
import select import select
import sys import sys

View file

@ -14,7 +14,9 @@
"""Worry-free YAML configuration files. """Worry-free YAML configuration files.
""" """
from __future__ import unicode_literals from __future__ import (unicode_literals, absolute_import, print_function,
division)
import platform import platform
import os import os
import pkgutil import pkgutil

View file

@ -12,6 +12,8 @@
# The above copyright notice and this permission notice shall be # The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software. # included in all copies or substantial portions of the Software.
from __future__ import division, absolute_import, print_function
from enum import Enum from enum import Enum

View file

@ -25,7 +25,8 @@ library: unknown symbols are left intact.
This is sort of like a tiny, horrible degeneration of a real templating This is sort of like a tiny, horrible degeneration of a real templating
engine like Jinja2 or Mustache. engine like Jinja2 or Mustache.
""" """
from __future__ import print_function
from __future__ import division, absolute_import, print_function
import re import re
import ast import ast

View file

@ -30,7 +30,8 @@ up a bottleneck stage by dividing its work among multiple threads.
To do so, pass an iterable of coroutines to the Pipeline constructor To do so, pass an iterable of coroutines to the Pipeline constructor
in place of any single coroutine. in place of any single coroutine.
""" """
from __future__ import print_function
from __future__ import division, absolute_import, print_function
import Queue import Queue
from threading import Thread, Lock from threading import Thread, Lock

View file

@ -15,6 +15,8 @@
"""A simple utility for constructing filesystem-like trees from beets """A simple utility for constructing filesystem-like trees from beets
libraries. libraries.
""" """
from __future__ import division, absolute_import, print_function
from collections import namedtuple from collections import namedtuple
from beets import util from beets import util

View file

@ -15,5 +15,7 @@
"""A namespace package for beets plugins.""" """A namespace package for beets plugins."""
# Make this a namespace package. # Make this a namespace package.
from __future__ import division, absolute_import, print_function
from pkgutil import extend_path from pkgutil import extend_path
__path__ = extend_path(__path__, __name__) __path__ = extend_path(__path__, __name__)

View file

@ -14,7 +14,8 @@
"""Some simple performance benchmarks for beets. """Some simple performance benchmarks for beets.
""" """
from __future__ import print_function
from __future__ import division, absolute_import, print_function
from beets.plugins import BeetsPlugin from beets.plugins import BeetsPlugin
from beets import ui from beets import ui

View file

@ -16,7 +16,8 @@
Beets library. Attempts to implement a compatible protocol to allow Beets library. Attempts to implement a compatible protocol to allow
use of the wide range of MPD clients. use of the wide range of MPD clients.
""" """
from __future__ import print_function
from __future__ import division, absolute_import, print_function
import re import re
from string import Template from string import Template

View file

@ -15,7 +15,8 @@
"""A wrapper for the GStreamer Python bindings that exposes a simple """A wrapper for the GStreamer Python bindings that exposes a simple
music player. music player.
""" """
from __future__ import print_function
from __future__ import division, absolute_import, print_function
import sys import sys
import time import time

View file

@ -14,6 +14,8 @@
"""Determine BPM by pressing a key to the rhythm.""" """Determine BPM by pressing a key to the rhythm."""
from __future__ import division, absolute_import, print_function
import time import time
from beets import ui from beets import ui

View file

@ -15,6 +15,8 @@
"""Provides the %bucket{} function for path formatting. """Provides the %bucket{} function for path formatting.
""" """
from __future__ import division, absolute_import, print_function
from datetime import datetime from datetime import datetime
import re import re
import string import string

View file

@ -15,6 +15,8 @@
"""Adds Chromaprint/Acoustid acoustic fingerprinting support to the """Adds Chromaprint/Acoustid acoustic fingerprinting support to the
autotagger. Requires the pyacoustid library. autotagger. Requires the pyacoustid library.
""" """
from __future__ import division, absolute_import, print_function
from beets import plugins from beets import plugins
from beets import ui from beets import ui
from beets import util from beets import util

View file

@ -14,6 +14,8 @@
"""Converts tracks or albums to external directory """Converts tracks or albums to external directory
""" """
from __future__ import division, absolute_import, print_function
import os import os
import threading import threading
import subprocess import subprocess

View file

@ -15,6 +15,8 @@
"""Adds Discogs album search support to the autotagger. Requires the """Adds Discogs album search support to the autotagger. Requires the
discogs-client library. discogs-client library.
""" """
from __future__ import division, absolute_import, print_function
import beets.ui import beets.ui
from beets import logging from beets import logging
from beets.autotag.hooks import AlbumInfo, TrackInfo, Distance from beets.autotag.hooks import AlbumInfo, TrackInfo, Distance

View file

@ -14,6 +14,8 @@
"""List duplicate tracks or albums. """List duplicate tracks or albums.
""" """
from __future__ import division, absolute_import, print_function
import shlex import shlex
from beets.plugins import BeetsPlugin from beets.plugins import BeetsPlugin

View file

@ -14,6 +14,8 @@
"""Fetch a variety of acoustic metrics from The Echo Nest. """Fetch a variety of acoustic metrics from The Echo Nest.
""" """
from __future__ import division, absolute_import, print_function
import time import time
import socket import socket
import os import os

View file

@ -13,6 +13,8 @@
# included in all copies or substantial portions of the Software. # included in all copies or substantial portions of the Software.
"""Allows beets to embed album art into file metadata.""" """Allows beets to embed album art into file metadata."""
from __future__ import division, absolute_import, print_function
import os.path import os.path
import imghdr import imghdr
import subprocess import subprocess

View file

@ -14,6 +14,8 @@
"""Fetches album art. """Fetches album art.
""" """
from __future__ import division, absolute_import, print_function
from contextlib import closing from contextlib import closing
import os import os
import re import re

View file

@ -15,6 +15,8 @@
"""Creates freedesktop.org-compliant .directory files on an album level. """Creates freedesktop.org-compliant .directory files on an album level.
""" """
from __future__ import division, absolute_import, print_function
from beets.plugins import BeetsPlugin from beets.plugins import BeetsPlugin
from beets.ui import Subcommand from beets.ui import Subcommand
from beets.ui import decargs from beets.ui import decargs

View file

@ -15,6 +15,8 @@
"""If the title is empty, try to extract track and title from the """If the title is empty, try to extract track and title from the
filename. filename.
""" """
from __future__ import division, absolute_import, print_function
from beets import plugins from beets import plugins
from beets.util import displayable_path from beets.util import displayable_path
import os import os

View file

@ -14,6 +14,8 @@
"""Moves "featured" artists to the title from the artist field. """Moves "featured" artists to the title from the artist field.
""" """
from __future__ import division, absolute_import, print_function
import re import re
from beets import plugins from beets import plugins

View file

@ -15,6 +15,8 @@
"""Provides a fuzzy matching query. """Provides a fuzzy matching query.
""" """
from __future__ import division, absolute_import, print_function
from beets.plugins import BeetsPlugin from beets.plugins import BeetsPlugin
from beets.dbcore.query import StringFieldQuery from beets.dbcore.query import StringFieldQuery
import difflib import difflib

View file

@ -12,6 +12,8 @@
# The above copyright notice and this permission notice shall be # The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software. # included in all copies or substantial portions of the Software.
from __future__ import division, absolute_import, print_function
"""Warns you about things you hate (or even blocks import).""" """Warns you about things you hate (or even blocks import)."""
from beets.plugins import BeetsPlugin from beets.plugins import BeetsPlugin

View file

@ -3,8 +3,8 @@ modification time (mtime) of the item's source file before import.
Reimported albums and items are skipped. Reimported albums and items are skipped.
""" """
from __future__ import (unicode_literals, absolute_import, print_function,
from __future__ import unicode_literals, absolute_import, print_function division)
import os import os

View file

@ -12,6 +12,8 @@
# The above copyright notice and this permission notice shall be # The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software. # included in all copies or substantial portions of the Software.
from __future__ import division, absolute_import, print_function
"""Write paths of imported files in various formats to ease later import in a """Write paths of imported files in various formats to ease later import in a
music player. Also allow printing the new file locations to stdout in case music player. Also allow printing the new file locations to stdout in case
one wants to manually add music to a player by its path. one wants to manually add music to a player by its path.

View file

@ -15,6 +15,8 @@
"""Shows file metadata. """Shows file metadata.
""" """
from __future__ import division, absolute_import, print_function
import os import os
from beets.plugins import BeetsPlugin from beets.plugins import BeetsPlugin

View file

@ -14,6 +14,8 @@
"""Allows inline path template customization code in the config file. """Allows inline path template customization code in the config file.
""" """
from __future__ import division, absolute_import, print_function
import traceback import traceback
import itertools import itertools

View file

@ -15,6 +15,8 @@
"""Uses the `KeyFinder` program to add the `initial_key` field. """Uses the `KeyFinder` program to add the `initial_key` field.
""" """
from __future__ import division, absolute_import, print_function
import subprocess import subprocess
from beets import ui from beets import ui

View file

@ -12,6 +12,8 @@
# The above copyright notice and this permission notice shall be # The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software. # included in all copies or substantial portions of the Software.
from __future__ import division, absolute_import, print_function
"""Gets genres for imported music based on Last.fm tags. """Gets genres for imported music based on Last.fm tags.
Uses a provided whitelist file to determine which tags are valid genres. Uses a provided whitelist file to determine which tags are valid genres.

View file

@ -12,6 +12,8 @@
# The above copyright notice and this permission notice shall be # The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software. # included in all copies or substantial portions of the Software.
from __future__ import division, absolute_import, print_function
import requests import requests
from beets import ui from beets import ui
from beets import dbcore from beets import dbcore

View file

@ -14,7 +14,8 @@
"""Fetches, embeds, and displays lyrics. """Fetches, embeds, and displays lyrics.
""" """
from __future__ import print_function
from __future__ import division, absolute_import, print_function
import re import re
import requests import requests

View file

@ -12,6 +12,8 @@
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
from __future__ import division, absolute_import, print_function
from beets.plugins import BeetsPlugin from beets.plugins import BeetsPlugin
from beets.ui import Subcommand from beets.ui import Subcommand
from beets import ui from beets import ui

View file

@ -14,6 +14,8 @@
"""Update library's tags using MusicBrainz. """Update library's tags using MusicBrainz.
""" """
from __future__ import division, absolute_import, print_function
from beets.plugins import BeetsPlugin from beets.plugins import BeetsPlugin
from beets import autotag, library, ui, util from beets import autotag, library, ui, util
from beets.autotag import hooks from beets.autotag import hooks

View file

@ -14,6 +14,8 @@
"""List missing tracks. """List missing tracks.
""" """
from __future__ import division, absolute_import, print_function
from beets.autotag import hooks from beets.autotag import hooks
from beets.library import Item from beets.library import Item
from beets.plugins import BeetsPlugin from beets.plugins import BeetsPlugin

View file

@ -13,6 +13,8 @@
# The above copyright notice and this permission notice shall be # The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software. # included in all copies or substantial portions of the Software.
from __future__ import division, absolute_import, print_function
import mpd import mpd
import socket import socket
import select import select

View file

@ -20,6 +20,8 @@ Put something like the following in your config.yaml to configure:
port: 6600 port: 6600
password: seekrit password: seekrit
""" """
from __future__ import division, absolute_import, print_function
from beets.plugins import BeetsPlugin from beets.plugins import BeetsPlugin
import os import os
import socket import socket

View file

@ -1,3 +1,5 @@
from __future__ import division, absolute_import, print_function
"""Fixes file permissions after the file gets written on import. Put something """Fixes file permissions after the file gets written on import. Put something
like the following in your config.yaml to configure: like the following in your config.yaml to configure:

View file

@ -14,6 +14,8 @@
"""Send the results of a query to the configured music player as a playlist. """Send the results of a query to the configured music player as a playlist.
""" """
from __future__ import division, absolute_import, print_function
from functools import partial from functools import partial
from beets.plugins import BeetsPlugin from beets.plugins import BeetsPlugin

View file

@ -5,6 +5,8 @@ Put something like the following in your config.yaml to configure:
host: localhost host: localhost
port: 32400 port: 32400
""" """
from __future__ import division, absolute_import, print_function
import requests import requests
from urlparse import urljoin from urlparse import urljoin
import xml.etree.ElementTree as ET import xml.etree.ElementTree as ET

View file

@ -14,7 +14,8 @@
"""Get a random song or album from the library. """Get a random song or album from the library.
""" """
from __future__ import absolute_import from __future__ import division, absolute_import, print_function
from beets.plugins import BeetsPlugin from beets.plugins import BeetsPlugin
from beets.ui import Subcommand, decargs, print_obj from beets.ui import Subcommand, decargs, print_obj
from beets.util.functemplate import Template from beets.util.functemplate import Template

View file

@ -12,6 +12,8 @@
# The above copyright notice and this permission notice shall be # The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software. # included in all copies or substantial portions of the Software.
from __future__ import division, absolute_import, print_function
import subprocess import subprocess
import os import os
import collections import collections

View file

@ -15,6 +15,8 @@
"""Uses user-specified rewriting rules to canonicalize names for path """Uses user-specified rewriting rules to canonicalize names for path
formats. formats.
""" """
from __future__ import division, absolute_import, print_function
import re import re
from collections import defaultdict from collections import defaultdict

View file

@ -16,6 +16,8 @@
automatically whenever tags are written. automatically whenever tags are written.
""" """
from __future__ import division, absolute_import, print_function
from beets.plugins import BeetsPlugin from beets.plugins import BeetsPlugin
from beets import ui from beets import ui
from beets import util from beets import util

View file

@ -14,7 +14,8 @@
"""Generates smart playlists based on beets queries. """Generates smart playlists based on beets queries.
""" """
from __future__ import print_function
from __future__ import division, absolute_import, print_function
from beets.plugins import BeetsPlugin from beets.plugins import BeetsPlugin
from beets import ui from beets import ui

View file

@ -1,4 +1,5 @@
from __future__ import print_function from __future__ import division, absolute_import, print_function
import re import re
import webbrowser import webbrowser
import requests import requests

View file

@ -14,6 +14,8 @@
"""Moves patterns in path formats (suitable for moving articles).""" """Moves patterns in path formats (suitable for moving articles)."""
from __future__ import division, absolute_import, print_function
import re import re
from beets.plugins import BeetsPlugin from beets.plugins import BeetsPlugin

View file

@ -12,6 +12,8 @@
# The above copyright notice and this permission notice shall be # The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software. # included in all copies or substantial portions of the Software.
from __future__ import division, absolute_import, print_function
from beets.plugins import BeetsPlugin from beets.plugins import BeetsPlugin
from beets.dbcore import types from beets.dbcore import types
from beets.util.confit import ConfigValueError from beets.util.confit import ConfigValueError

View file

@ -13,6 +13,8 @@
# included in all copies or substantial portions of the Software. # included in all copies or substantial portions of the Software.
"""A Web interface to beets.""" """A Web interface to beets."""
from __future__ import division, absolute_import, print_function
from beets.plugins import BeetsPlugin from beets.plugins import BeetsPlugin
from beets import ui from beets import ui
from beets import util from beets import util

View file

@ -14,6 +14,8 @@
""" Clears tag fields in media files.""" """ Clears tag fields in media files."""
from __future__ import division, absolute_import, print_function
import re import re
from beets.plugins import BeetsPlugin from beets.plugins import BeetsPlugin
from beets.mediafile import MediaFile from beets.mediafile import MediaFile

View file

@ -1,6 +1,8 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
"""A utility script for automating the beets release process. """A utility script for automating the beets release process.
""" """
from __future__ import division, absolute_import, print_function
import click import click
import os import os
import re import re

View file

@ -14,6 +14,8 @@
# The above copyright notice and this permission notice shall be # The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software. # included in all copies or substantial portions of the Software.
from __future__ import division, absolute_import, print_function
import os import os
import sys import sys
import subprocess import subprocess

View file

@ -13,6 +13,8 @@
# included in all copies or substantial portions of the Software. # included in all copies or substantial portions of the Software.
"""Some common functionality for beets' test cases.""" """Some common functionality for beets' test cases."""
from __future__ import division, absolute_import, print_function
import time import time
import sys import sys
import os import os

View file

@ -23,6 +23,8 @@ information or mock the environment.
- The `generate_album_info` and `generate_track_info` functions return - The `generate_album_info` and `generate_track_info` functions return
fixtures to be used when mocking the autotagger. fixtures to be used when mocking the autotagger.
from __future__ import division, absolute_import, print_function
- The `TestImportSession` allows one to run importer code while - The `TestImportSession` allows one to run importer code while
controlling the interactions through code. controlling the interactions through code.

View file

@ -12,6 +12,8 @@
# The above copyright notice and this permission notice shall be # The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software. # included in all copies or substantial portions of the Software.
from __future__ import division, absolute_import, print_function
import os import os
import sys import sys
import requests import requests

View file

@ -1,3 +1,5 @@
from __future__ import division, absolute_import, print_function
from beets.plugins import BeetsPlugin from beets.plugins import BeetsPlugin
from beets import ui from beets import ui

View file

@ -14,6 +14,8 @@
"""Tests for the album art fetchers.""" """Tests for the album art fetchers."""
from __future__ import division, absolute_import, print_function
import os import os
import shutil import shutil

View file

@ -14,6 +14,8 @@
"""Tests for autotagging functionality. """Tests for autotagging functionality.
""" """
from __future__ import division, absolute_import, print_function
import re import re
import copy import copy

View file

@ -15,6 +15,8 @@
"""Tests for the 'bucket' plugin.""" """Tests for the 'bucket' plugin."""
from __future__ import division, absolute_import, print_function
from test._common import unittest from test._common import unittest
from beetsplug import bucket from beetsplug import bucket
from beets import config, ui from beets import config, ui

View file

@ -1,3 +1,5 @@
from __future__ import division, absolute_import, print_function
import os import os
import yaml import yaml
from mock import patch from mock import patch

View file

@ -12,6 +12,8 @@
# The above copyright notice and this permission notice shall be # The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software. # included in all copies or substantial portions of the Software.
from __future__ import division, absolute_import, print_function
import re import re
import os.path import os.path
from test import _common from test import _common

View file

@ -14,6 +14,8 @@
"""Test for dbcore's date-based queries. """Test for dbcore's date-based queries.
""" """
from __future__ import division, absolute_import, print_function
from test import _common from test import _common
from test._common import unittest from test._common import unittest
from datetime import datetime from datetime import datetime

View file

@ -14,6 +14,8 @@
"""Tests for the DBCore database abstraction. """Tests for the DBCore database abstraction.
""" """
from __future__ import division, absolute_import, print_function
import os import os
import sqlite3 import sqlite3

View file

@ -13,6 +13,8 @@
# included in all copies or substantial portions of the Software. # included in all copies or substantial portions of the Software.
from __future__ import division, absolute_import, print_function
import os.path import os.path
from mock import Mock, patch from mock import Mock, patch

View file

@ -12,6 +12,8 @@
# The above copyright notice and this permission notice shall be # The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software. # included in all copies or substantial portions of the Software.
from __future__ import division, absolute_import, print_function
import os.path import os.path
from mock import Mock, patch from mock import Mock, patch

View file

@ -12,6 +12,8 @@
# The above copyright notice and this permission notice shall be # The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software. # included in all copies or substantial portions of the Software.
from __future__ import division, absolute_import, print_function
import os import os
from test._common import unittest from test._common import unittest
from test.helper import TestHelper from test.helper import TestHelper

View file

@ -14,6 +14,8 @@
"""Test file manipulation functionality of Item. """Test file manipulation functionality of Item.
""" """
from __future__ import division, absolute_import, print_function
import shutil import shutil
import os import os
import stat import stat

View file

@ -14,6 +14,8 @@
"""Tests for the 'ftintitle' plugin.""" """Tests for the 'ftintitle' plugin."""
from __future__ import division, absolute_import, print_function
from test._common import unittest from test._common import unittest
from beetsplug import ftintitle from beetsplug import ftintitle

View file

@ -1,5 +1,7 @@
"""Tests for the 'ihate' plugin""" """Tests for the 'ihate' plugin"""
from __future__ import division, absolute_import, print_function
from test._common import unittest from test._common import unittest
from beets import importer from beets import importer
from beets.library import Item from beets.library import Item

View file

@ -12,6 +12,8 @@
# The above copyright notice and this permission notice shall be # The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software. # included in all copies or substantial portions of the Software.
from __future__ import division, absolute_import, print_function
"""Tests for the `importadded` plugin.""" """Tests for the `importadded` plugin."""
import os import os

View file

@ -13,6 +13,8 @@
# The above copyright notice and this permission notice shall be # The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software. # included in all copies or substantial portions of the Software.
from __future__ import division, absolute_import, print_function
"""Tests for the general importer functionality. """Tests for the general importer functionality.
""" """
import os import os

View file

@ -1,3 +1,5 @@
from __future__ import division, absolute_import, print_function
import os import os
import os.path import os.path
import tempfile import tempfile

View file

@ -12,6 +12,8 @@
# The above copyright notice and this permission notice shall be # The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software. # included in all copies or substantial portions of the Software.
from __future__ import division, absolute_import, print_function
from test._common import unittest from test._common import unittest
from test.helper import TestHelper from test.helper import TestHelper

View file

@ -12,6 +12,8 @@
# The above copyright notice and this permission notice shall be # The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software. # included in all copies or substantial portions of the Software.
from __future__ import division, absolute_import, print_function
from mock import patch from mock import patch
from test._common import unittest from test._common import unittest
from test.helper import TestHelper from test.helper import TestHelper

View file

@ -14,6 +14,8 @@
"""Tests for the 'lastgenre' plugin.""" """Tests for the 'lastgenre' plugin."""
from __future__ import division, absolute_import, print_function
from mock import Mock from mock import Mock
from test import _common from test import _common

View file

@ -14,6 +14,8 @@
"""Tests for non-query database functions of Item. """Tests for non-query database functions of Item.
""" """
from __future__ import division, absolute_import, print_function
import os import os
import os.path import os.path
import stat import stat

View file

@ -1,4 +1,6 @@
"""Stupid tests that ensure logging works as expected""" """Stupid tests that ensure logging works as expected"""
from __future__ import division, absolute_import, print_function
import logging as log import logging as log
from StringIO import StringIO from StringIO import StringIO

View file

@ -14,6 +14,8 @@
"""Tests for the 'lyrics' plugin.""" """Tests for the 'lyrics' plugin."""
from __future__ import division, absolute_import, print_function
import os import os
from test import _common from test import _common
import sys import sys

View file

@ -14,6 +14,8 @@
"""Tests for MusicBrainz API wrapper. """Tests for MusicBrainz API wrapper.
""" """
from __future__ import division, absolute_import, print_function
from test import _common from test import _common
from test._common import unittest from test._common import unittest
from beets.autotag import mb from beets.autotag import mb

View file

@ -12,6 +12,8 @@
# The above copyright notice and this permission notice shall be # The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software. # included in all copies or substantial portions of the Software.
from __future__ import division, absolute_import, print_function
from mock import patch from mock import patch
from test._common import unittest from test._common import unittest

View file

@ -15,6 +15,8 @@
"""Automatically-generated blanket testing for the MediaFile metadata """Automatically-generated blanket testing for the MediaFile metadata
layer. layer.
""" """
from __future__ import division, absolute_import, print_function
import os import os
import shutil import shutil
import tempfile import tempfile

Some files were not shown because too many files have changed in this diff Show more