Skip to content

Commit

Permalink
isort: Consistently use two blank lines after import
Browse files Browse the repository at this point in the history
  • Loading branch information
phw committed Apr 4, 2019
1 parent dd4da2a commit dc0ec84
Show file tree
Hide file tree
Showing 51 changed files with 51 additions and 0 deletions.
1 change: 1 addition & 0 deletions .isort.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ skip_glob=**/picard/ui/ui_*.py
skip=./tagger.py,picard/const/attributes.py,picard/const/countries.py,picard/resources.py,scripts/picard.in,picard/const/__init__.py,picard/formats/__init__.py,picard/coverart/providers/__init__.py
not_skip=__init__.py
use_parentheses=1
lines_after_imports=2
1 change: 1 addition & 0 deletions picard/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

import re


PICARD_ORG_NAME = "MusicBrainz"
PICARD_APP_NAME = "Picard"
PICARD_VERSION = (2, 2, 0, 'dev', 1)
Expand Down
1 change: 1 addition & 0 deletions picard/collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
log,
)


user_collections = {}


Expand Down
1 change: 1 addition & 0 deletions picard/config_upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
DEFAULT_NUMBERED_SCRIPT_NAME,
)


# TO ADD AN UPGRADE HOOK:
# ----------------------
# add a function here, named after the version you want upgrade to
Expand Down
1 change: 1 addition & 0 deletions picard/const/sys.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

import sys


IS_WIN = sys.platform == 'win32'
IS_LINUX = sys.platform == 'linux'
IS_MACOS = sys.platform == 'darwin'
Expand Down
1 change: 1 addition & 0 deletions picard/coverart/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
)
from picard.util.scripttofilename import script_to_filename


_datafiles = dict()
_datafile_mutex = QMutex(QMutex.Recursive)

Expand Down
1 change: 1 addition & 0 deletions picard/coverart/providers/caa.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
from picard.ui.ui_provider_options_caa import Ui_CaaOptions
from picard.ui.util import StandardButton


CaaSizeItem = namedtuple('CaaSizeItem', ['thumbnail', 'label'])

_CAA_THUMBNAIL_SIZE_MAP = OrderedDict([
Expand Down
1 change: 1 addition & 0 deletions picard/coverart/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
from picard.const import MB_ATTRIBUTES
from picard.i18n import gettext_attr


# list of types from http://musicbrainz.org/doc/Cover_Art/Types
# order of declaration is preserved in selection box
CAA_TYPES = []
Expand Down
1 change: 1 addition & 0 deletions picard/formats/apev2.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@

from .mutagenext import tak


INVALID_CHARS = re.compile('[^\x20-\x7e]')
BLACKLISTED_KEYS = ['ID3', 'TAG', 'OggS', 'MP+']
UNSUPPORTED_TAGS = [
Expand Down
1 change: 1 addition & 0 deletions picard/formats/id3.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
sanitize_date,
)


id3.GRP1 = compatid3.GRP1
id3.TCMP = compatid3.TCMP
id3.TSO2 = compatid3.TSO2
Expand Down
1 change: 1 addition & 0 deletions picard/formats/mutagenext/compatid3.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
TextFrame,
)


try:
from mutagen.id3 import GRP1
except ImportError:
Expand Down
1 change: 1 addition & 0 deletions picard/formats/vorbis.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
sanitize_date,
)


INVALID_CHARS = re.compile('([^\x20-\x7d]|=)')


Expand Down
1 change: 1 addition & 0 deletions picard/i18n.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
IS_WIN,
)


builtins.__dict__['N_'] = lambda a: a


Expand Down
1 change: 1 addition & 0 deletions picard/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

from PyQt5 import QtCore


_MAX_TAIL_LEN = 10**6

VERBOSITY_DEFAULT = logging.WARNING
Expand Down
1 change: 1 addition & 0 deletions picard/mbjson.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
translate_from_sortname,
)


_artist_rel_types = {
"arranger": "arranger",
"audio": "engineer",
Expand Down
1 change: 1 addition & 0 deletions picard/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
from picard.util.imagelist import ImageList
from picard.util.tags import PRESERVED_TAGS


MULTI_VALUED_JOINER = '; '

# lengths difference over this number of milliseconds will give a score of 0.0
Expand Down
1 change: 1 addition & 0 deletions picard/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
)
import picard.plugins


_suffixes = [s[0] for s in imp.get_suffixes()]
_package_entries = ["__init__.py", "__init__.pyc", "__init__.pyo"]
_extension_points = []
Expand Down
1 change: 1 addition & 0 deletions picard/track.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@

from picard.ui.item import Item


_TRANSLATE_TAGS = {
"hip hop": "Hip-Hop",
"synth-pop": "Synthpop",
Expand Down
1 change: 1 addition & 0 deletions picard/ui/filebrowser.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
from picard.formats import supported_formats
from picard.util import find_existing_path


_default_current_browser_path = QStandardPaths.writableLocation(QStandardPaths.HomeLocation)


Expand Down
1 change: 1 addition & 0 deletions picard/ui/mainwindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
find_starting_directory,
)


ui_init = ExtensionPoint()


Expand Down
1 change: 1 addition & 0 deletions picard/ui/metadatabox.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@

from picard.ui.edittagdialog import EditTagDialog


COMMON_TAGS = [
"title",
"artist",
Expand Down
1 change: 1 addition & 0 deletions picard/ui/options/cdlookup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
register_options_page,
)


if AUTO_DETECT_DRIVES:
from picard.ui.ui_options_cdlookup_select import Ui_CDLookupOptionsPage
else:
Expand Down
1 change: 1 addition & 0 deletions picard/ui/options/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
from picard.ui.ui_options_interface import Ui_InterfaceOptionsPage
from picard.ui.util import enabledSlot


_default_starting_dir = QStandardPaths.writableLocation(QStandardPaths.HomeLocation)


Expand Down
1 change: 1 addition & 0 deletions picard/ui/options/plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
)
from picard.ui.ui_options_plugins import Ui_PluginsOptionsPage


COLUMN_NAME, COLUMN_VERSION, COLUMN_ACTIONS = range(3)


Expand Down
1 change: 1 addition & 0 deletions picard/ui/options/releases.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
)
from picard.ui.ui_options_releases import Ui_ReleasesOptionsPage


_DEFAULT_SCORE = 0.5
_release_type_scores = [(g, _DEFAULT_SCORE) for g in list(RELEASE_PRIMARY_GROUPS.keys()) + list(RELEASE_SECONDARY_GROUPS.keys())]

Expand Down
1 change: 1 addition & 0 deletions picard/ui/options/renaming.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
from picard.ui.ui_options_renaming import Ui_RenamingOptionsPage
from picard.ui.util import enabledSlot


_default_music_dir = QStandardPaths.writableLocation(QStandardPaths.MusicLocation)


Expand Down
1 change: 1 addition & 0 deletions picard/util/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
IS_WIN,
)


if IS_WIN:
from ctypes import windll

Expand Down
1 change: 1 addition & 0 deletions picard/util/bytes2human.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

import locale


# used to force gettextization
_BYTES_STRINGS_I18N = (
N_('%s B'),
Expand Down
1 change: 1 addition & 0 deletions picard/util/cdrom.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
)
from picard.util import uniqify


if IS_WIN:
from ctypes import windll

Expand Down
1 change: 1 addition & 0 deletions picard/util/icontheme.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

from picard.const.sys import IS_WIN


if IS_WIN:
_search_paths = []
else:
Expand Down
1 change: 1 addition & 0 deletions picard/util/textencoding.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@

from picard.util import sanitize_filename


######################### LATIN SIMPLIFICATION ###########################
# The translation tables for punctuation and latin combined-characters are taken from
# http://unicode.org/repos/cldr/trunk/common/transforms/Latin-ASCII.xml
Expand Down
1 change: 1 addition & 0 deletions picard/util/versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
from picard.disc import discid_version
from picard.util.astrcmp import astrcmp_implementation


_versions = OrderedDict([
("version", PICARD_FANCY_VERSION_STR),
("python-version", python_version()),
Expand Down
1 change: 1 addition & 0 deletions picard/util/xml.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

from PyQt5.QtCore import QXmlStreamReader


_node_name_re = re.compile('[^a-zA-Z0-9]')


Expand Down
1 change: 1 addition & 0 deletions picard/webservice/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
from picard.util.xml import parse_xml
from picard.webservice import ratecontrol


COUNT_REQUESTS_DELAY_MS = 250

TEMP_ERRORS_RETRIES = 5
Expand Down
1 change: 1 addition & 0 deletions picard/webservice/api_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
ratecontrol,
)


ratecontrol.set_minimum_delay((ACOUSTID_HOST, ACOUSTID_PORT), 333)
ratecontrol.set_minimum_delay((CAA_HOST, CAA_PORT), 0)

Expand Down
1 change: 1 addition & 0 deletions picard/webservice/ratecontrol.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

from picard import log


# ============================================================================
# Throttling/congestion avoidance
# ============================================================================
Expand Down
1 change: 1 addition & 0 deletions test/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import glob
import os.path


for filename in glob.glob(os.path.join(os.path.dirname(__file__), "test_*.py")):
__import__("test." + os.path.basename(filename)[:-3])
1 change: 1 addition & 0 deletions test/formats/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from picard.formats import ext_to_format
from picard.metadata import Metadata


settings = {
'clear_existing_tags': False,
'embed_only_one_front_image': False,
Expand Down
1 change: 1 addition & 0 deletions test/formats/test_apev2.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
)
from .coverart import CommonCoverArtTests


VALID_KEYS = [
' valid Key}',
'{ $ome tag~}',
Expand Down
1 change: 1 addition & 0 deletions test/formats/test_vorbis.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
file_save_image,
)


VALID_KEYS = [
' valid Key}',
'{ $ome tag}',
Expand Down
1 change: 1 addition & 0 deletions test/test_acoustid.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from picard.metadata import Metadata
from picard.track import Track


settings = {
"standardize_tracks": False,
"standardize_artists": False,
Expand Down
1 change: 1 addition & 0 deletions test/test_browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from picard.browser.filelookup import FileLookup
from picard.util import webbrowser2


SERVER = 'musicbrainz.org'
PORT = 443
LOCAL_PORT = "8000"
Expand Down
1 change: 1 addition & 0 deletions test/test_filesystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from picard import config
import picard.formats


settings = {
'enabled_plugins': '',
'move_files': True,
Expand Down
1 change: 1 addition & 0 deletions test/test_mbjson.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
from picard.releasegroup import ReleaseGroup
from picard.track import Track


settings = {
"standardize_tracks": False,
"standardize_artists": False,
Expand Down
1 change: 1 addition & 0 deletions test/test_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
)
from picard.util.tags import PRESERVED_TAGS


settings = {
'write_id3v23': False,
'id3v23_join_with': '/',
Expand Down
1 change: 1 addition & 0 deletions test/test_releaseversions.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from picard.i18n import setup_gettext
from picard.releasegroup import ReleaseGroup


settings = {
"standardize_tracks": False,
"standardize_artists": False,
Expand Down
1 change: 1 addition & 0 deletions test/test_scripttofilename.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from picard.script import register_script_function
from picard.util.scripttofilename import script_to_filename


settings = {
'ascii_filenames': False,
'enabled_plugins': [],
Expand Down
1 change: 1 addition & 0 deletions test/test_textencoding.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

from picard import util


#from picard.util import textencoding

# Set the value to true below to show the coverage of Latin characters
Expand Down
1 change: 1 addition & 0 deletions test/test_util_astrcmp.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

from picard.util.astrcmp import astrcmp_py


try:
from picard.util.astrcmp import astrcmp_c
except ImportError:
Expand Down
1 change: 1 addition & 0 deletions test/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
sort_by_similarity,
)


# ensure _() is defined
if '_' not in builtins.__dict__:
builtins.__dict__['_'] = lambda a: a
Expand Down
Loading

0 comments on commit dc0ec84

Please sign in to comment.