mirror of
https://github.com/beetbox/beets.git
synced 2025-12-15 21:14:19 +01:00
remove with_statement __future__ imports
This is the first of several commits that will modernize the beets codebase for Python 2.6 conventions. (Compatibility with Python 2.5 is hereby abandoned.)
This commit is contained in:
parent
b68e87b92c
commit
f6b37d2c8c
10 changed files with 6 additions and 18 deletions
|
|
@ -8,7 +8,7 @@
|
|||
# distribute, sublicense, and/or sell copies of the Software, and to
|
||||
# permit persons to whom the Software is furnished to do so, subject to
|
||||
# the following conditions:
|
||||
#
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be
|
||||
# included in all copies or substantial portions of the Software.
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@
|
|||
"""Provides the basic, interface-agnostic workflow for importing and
|
||||
autotagging music files.
|
||||
"""
|
||||
from __future__ import with_statement # Python 2.5
|
||||
import os
|
||||
import logging
|
||||
import pickle
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# This file is part of beets.
|
||||
# Copyright 2011, Adrian Sampson.
|
||||
# Copyright 2012, Adrian Sampson.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining
|
||||
# a copy of this software and associated documentation files (the
|
||||
|
|
@ -12,7 +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 with_statement
|
||||
"""The core data store and collection logic for beets.
|
||||
"""
|
||||
import sqlite3
|
||||
import os
|
||||
import re
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@
|
|||
"""This module provides the default commands for beets' command-line
|
||||
interface.
|
||||
"""
|
||||
from __future__ import with_statement # Python 2.5
|
||||
import logging
|
||||
import sys
|
||||
import os
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@ up a bottleneck stage by dividing its work among multiple threads.
|
|||
To do so, pass an iterable of coroutines to the Pipeline constructor
|
||||
in place of any single coroutine.
|
||||
"""
|
||||
from __future__ import with_statement # for Python 2.5
|
||||
import Queue
|
||||
from threading import Thread, Lock
|
||||
import sys
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@
|
|||
"""Adds Chromaprint/Acoustid acoustic fingerprinting support to the
|
||||
autotagger. Requires the pyacoustid library.
|
||||
"""
|
||||
from __future__ import with_statement
|
||||
from beets import plugins
|
||||
from beets import ui
|
||||
from beets import util
|
||||
|
|
@ -27,7 +26,7 @@ from collections import defaultdict
|
|||
API_KEY = '1vOwZtEn'
|
||||
SCORE_THRESH = 0.5
|
||||
TRACK_ID_WEIGHT = 10.0
|
||||
COMMON_REL_THRESH = 0.6 # How many tracks must have an album in common?
|
||||
COMMON_REL_THRESH = 0.6 # How many tracks must have an album in common?
|
||||
|
||||
log = logging.getLogger('beets')
|
||||
|
||||
|
|
|
|||
|
|
@ -13,8 +13,6 @@
|
|||
# included in all copies or substantial portions of the Software.
|
||||
|
||||
"""Allows beets to embed album art into file metadata."""
|
||||
from __future__ import with_statement
|
||||
|
||||
import logging
|
||||
import imghdr
|
||||
|
||||
|
|
|
|||
|
|
@ -15,16 +15,13 @@
|
|||
"""Write paths of imported files in various formats to ease later import in a
|
||||
music player.
|
||||
"""
|
||||
|
||||
from __future__ import with_statement
|
||||
import datetime
|
||||
import os
|
||||
import sys
|
||||
import re
|
||||
|
||||
from beets import ui
|
||||
from beets.plugins import BeetsPlugin
|
||||
from beets.util import normpath, copy
|
||||
from beets.util import normpath
|
||||
|
||||
M3U_DEFAULT_NAME = 'imported.m3u'
|
||||
|
||||
|
|
|
|||
|
|
@ -24,8 +24,6 @@ The included (default) genre list was produced by scraping Wikipedia.
|
|||
The scraper script used is available here:
|
||||
https://gist.github.com/1241307
|
||||
"""
|
||||
from __future__ import with_statement
|
||||
|
||||
import logging
|
||||
import pylast
|
||||
import os
|
||||
|
|
|
|||
|
|
@ -15,8 +15,6 @@
|
|||
"""Cleans extraneous metadata from files' tags via a command or
|
||||
automatically whenever tags are written.
|
||||
"""
|
||||
from __future__ import with_statement
|
||||
|
||||
import logging
|
||||
|
||||
from beets.plugins import BeetsPlugin
|
||||
|
|
|
|||
Loading…
Reference in a new issue