Add workarounds for isort

* Add workaround for unicodedata issue
 * Change line length to 120
 * Skip gtkui.py to stop it moving local imports above the install reactor line
This commit is contained in:
Calum Lind 2014-09-19 15:43:21 +01:00
parent b8ab6e4083
commit d0b8e17873
9 changed files with 23 additions and 17 deletions

View File

@ -61,8 +61,7 @@ from deluge.core.preferencesmanager import PreferencesManager
from deluge.core.rpcserver import export from deluge.core.rpcserver import export
from deluge.core.torrentmanager import TorrentManager from deluge.core.torrentmanager import TorrentManager
from deluge.error import DelugeError, InvalidPathError, InvalidTorrentError from deluge.error import DelugeError, InvalidPathError, InvalidTorrentError
from deluge.event import (NewVersionAvailableEvent, SessionPausedEvent, SessionResumedEvent, from deluge.event import NewVersionAvailableEvent, SessionPausedEvent, SessionResumedEvent, TorrentQueueChangedEvent
TorrentQueueChangedEvent)
from deluge.httpdownloader import download_file from deluge.httpdownloader import download_file
log = logging.getLogger(__name__) log = logging.getLogger(__name__)

View File

@ -49,8 +49,7 @@ from twisted.internet.protocol import Factory
import deluge.component as component import deluge.component as component
import deluge.configmanager import deluge.configmanager
from deluge.core.authmanager import AUTH_LEVEL_ADMIN, AUTH_LEVEL_DEFAULT, AUTH_LEVEL_NONE from deluge.core.authmanager import AUTH_LEVEL_ADMIN, AUTH_LEVEL_DEFAULT, AUTH_LEVEL_NONE
from deluge.error import (_ClientSideRecreateError, DelugeError, IncompatibleClient, NotAuthorizedError, from deluge.error import _ClientSideRecreateError, DelugeError, IncompatibleClient, NotAuthorizedError, WrappedException
WrappedException)
from deluge.transfer import DelugeTransferProtocol from deluge.transfer import DelugeTransferProtocol
RPC_RESPONSE = 1 RPC_RESPONSE = 1

View File

@ -27,9 +27,9 @@ from deluge.configmanager import ConfigManager, get_config_dir
from deluge.core.authmanager import AUTH_LEVEL_ADMIN from deluge.core.authmanager import AUTH_LEVEL_ADMIN
from deluge.core.torrent import sanitize_filepath, Torrent, TorrentOptions from deluge.core.torrent import sanitize_filepath, Torrent, TorrentOptions
from deluge.error import InvalidTorrentError from deluge.error import InvalidTorrentError
from deluge.event import (PreTorrentRemovedEvent, SessionStartedEvent, TorrentAddedEvent, from deluge.event import (PreTorrentRemovedEvent, SessionStartedEvent, TorrentAddedEvent, TorrentFileCompletedEvent,
TorrentFileCompletedEvent, TorrentFileRenamedEvent, TorrentFinishedEvent, TorrentFileRenamedEvent, TorrentFinishedEvent, TorrentRemovedEvent, TorrentResumedEvent,
TorrentRemovedEvent, TorrentResumedEvent, TorrentStateChangedEvent) TorrentStateChangedEvent)
log = logging.getLogger(__name__) log = logging.getLogger(__name__)

View File

@ -64,8 +64,7 @@ __all__ = ['dumps', 'loads']
import struct import struct
from threading import Lock from threading import Lock
from types import (DictType, FloatType, IntType, ListType, LongType, NoneType, StringType, TupleType, from types import DictType, FloatType, IntType, ListType, LongType, NoneType, StringType, TupleType, UnicodeType
UnicodeType)
# Default number of bits for serialized floats, either 32 or 64 (also a parameter for dumps()). # Default number of bits for serialized floats, either 32 or 64 (also a parameter for dumps()).
DEFAULT_FLOAT_BITS = 32 DEFAULT_FLOAT_BITS = 32

View File

@ -9,11 +9,11 @@
import re import re
from collections import deque from collections import deque
import deluge.common
from unicodedata import normalize as ud_normalize from unicodedata import normalize as ud_normalize
from unicodedata import east_asian_width from unicodedata import east_asian_width
import deluge.common
def format_speed(speed): def format_speed(speed):
if (speed > 0): if (speed > 0):

View File

@ -15,9 +15,8 @@ from deluge.ui.client import client
from deluge.ui.console.basemode import BaseMode from deluge.ui.console.basemode import BaseMode
from deluge.ui.console.input_popup import Popup, SelectInput from deluge.ui.console.input_popup import Popup, SelectInput
from deluge.ui.console.popup import MessagePopup from deluge.ui.console.popup import MessagePopup
from deluge.ui.console.preference_panes import (BandwidthPane, CachePane, ColumnsPane, DaemonPane, from deluge.ui.console.preference_panes import (BandwidthPane, CachePane, ColumnsPane, DaemonPane, DownloadsPane,
DownloadsPane, InterfacePane, NetworkPane, OtherPane, InterfacePane, NetworkPane, OtherPane, ProxyPane, QueuePane)
ProxyPane, QueuePane)
try: try:
import curses import curses

View File

@ -18,3 +18,8 @@ frameworks = CoreFoundation, Foundation, AppKit
max-line-length = 120 max-line-length = 120
builtins = _ builtins = _
ignore = N802 ignore = N802
[isort]
known_standard_library=unicodedata
line_length=120
skip=gtkui.py

View File

@ -1,10 +1,14 @@
import os, glob, sys import glob
import os
import shutil import shutil
import sys
import gtk import gtk
import icon
from bbfreeze import Freezer
import bbfreeze.recipes import bbfreeze.recipes
import deluge.common import deluge.common
import icon
from bbfreeze import Freezer
# Get build_version from installed deluge # Get build_version from installed deluge
build_version = deluge.common.get_version() build_version = deluge.common.get_version()

View File

@ -24,6 +24,7 @@ LOAD_LIBRARY_AS_DATAFILE = 2
import struct import struct
import types import types
try: try:
StringTypes = types.StringTypes StringTypes = types.StringTypes
except AttributeError: except AttributeError: