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.torrentmanager import TorrentManager
from deluge.error import DelugeError, InvalidPathError, InvalidTorrentError
from deluge.event import (NewVersionAvailableEvent, SessionPausedEvent, SessionResumedEvent,
TorrentQueueChangedEvent)
from deluge.event import NewVersionAvailableEvent, SessionPausedEvent, SessionResumedEvent, TorrentQueueChangedEvent
from deluge.httpdownloader import download_file
log = logging.getLogger(__name__)

View File

@ -49,8 +49,7 @@ from twisted.internet.protocol import Factory
import deluge.component as component
import deluge.configmanager
from deluge.core.authmanager import AUTH_LEVEL_ADMIN, AUTH_LEVEL_DEFAULT, AUTH_LEVEL_NONE
from deluge.error import (_ClientSideRecreateError, DelugeError, IncompatibleClient, NotAuthorizedError,
WrappedException)
from deluge.error import _ClientSideRecreateError, DelugeError, IncompatibleClient, NotAuthorizedError, WrappedException
from deluge.transfer import DelugeTransferProtocol
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.torrent import sanitize_filepath, Torrent, TorrentOptions
from deluge.error import InvalidTorrentError
from deluge.event import (PreTorrentRemovedEvent, SessionStartedEvent, TorrentAddedEvent,
TorrentFileCompletedEvent, TorrentFileRenamedEvent, TorrentFinishedEvent,
TorrentRemovedEvent, TorrentResumedEvent, TorrentStateChangedEvent)
from deluge.event import (PreTorrentRemovedEvent, SessionStartedEvent, TorrentAddedEvent, TorrentFileCompletedEvent,
TorrentFileRenamedEvent, TorrentFinishedEvent, TorrentRemovedEvent, TorrentResumedEvent,
TorrentStateChangedEvent)
log = logging.getLogger(__name__)

View File

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

View File

@ -9,11 +9,11 @@
import re
from collections import deque
import deluge.common
from unicodedata import normalize as ud_normalize
from unicodedata import east_asian_width
import deluge.common
def format_speed(speed):
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.input_popup import Popup, SelectInput
from deluge.ui.console.popup import MessagePopup
from deluge.ui.console.preference_panes import (BandwidthPane, CachePane, ColumnsPane, DaemonPane,
DownloadsPane, InterfacePane, NetworkPane, OtherPane,
ProxyPane, QueuePane)
from deluge.ui.console.preference_panes import (BandwidthPane, CachePane, ColumnsPane, DaemonPane, DownloadsPane,
InterfacePane, NetworkPane, OtherPane, ProxyPane, QueuePane)
try:
import curses

View File

@ -18,3 +18,8 @@ frameworks = CoreFoundation, Foundation, AppKit
max-line-length = 120
builtins = _
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 sys
import gtk
import icon
from bbfreeze import Freezer
import bbfreeze.recipes
import deluge.common
import icon
from bbfreeze import Freezer
# Get build_version from installed deluge
build_version = deluge.common.get_version()

View File

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