Skip to content

Commit

Permalink
Workaround for the isort Travis issue by using order-by-type
Browse files Browse the repository at this point in the history
See isort issue: PyCQA/isort#185
  • Loading branch information
cas-- committed Sep 26, 2014
1 parent 62a9e39 commit dd8e37a
Show file tree
Hide file tree
Showing 16 changed files with 19 additions and 18 deletions.
2 changes: 1 addition & 1 deletion deluge/core/daemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from deluge.common import get_version, is_ip, windows_check
from deluge.configmanager import get_config_dir
from deluge.core.core import Core
from deluge.core.rpcserver import export, RPCServer
from deluge.core.rpcserver import RPCServer, export
from deluge.error import DaemonRunningError

if windows_check():
Expand Down
4 changes: 2 additions & 2 deletions deluge/core/rpcserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
import traceback
from types import FunctionType

from OpenSSL import crypto, SSL
from OpenSSL import SSL, crypto
from twisted.internet import defer, reactor
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 DelugeError, IncompatibleClient, NotAuthorizedError, WrappedException, _ClientSideRecreateError
from deluge.transfer import DelugeTransferProtocol

RPC_RESPONSE = 1
Expand Down
2 changes: 1 addition & 1 deletion deluge/core/torrentmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from deluge.common import decode_string, get_magnet_info, utf8_encoded
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.core.torrent import Torrent, TorrentOptions, sanitize_filepath
from deluge.error import InvalidTorrentError
from deluge.event import (PreTorrentRemovedEvent, SessionStartedEvent, TorrentAddedEvent, TorrentFileCompletedEvent,
TorrentFileRenamedEvent, TorrentFinishedEvent, TorrentRemovedEvent, TorrentResumedEvent,
Expand Down
2 changes: 1 addition & 1 deletion deluge/plugins/AutoAdd/deluge/plugins/autoadd/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import shutil

from twisted.internet import reactor
from twisted.internet.task import deferLater, LoopingCall
from twisted.internet.task import LoopingCall, deferLater

import deluge.component as component
import deluge.configmanager
Expand Down
4 changes: 2 additions & 2 deletions deluge/plugins/Blocklist/deluge/plugins/blocklist/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
from deluge.httpdownloader import download_file
from deluge.plugins.pluginbase import CorePluginBase

from .common import BadIP, IP
from .detect import create_reader, detect_compression, detect_format, UnknownFormatError
from .common import IP, BadIP
from .detect import UnknownFormatError, create_reader, detect_compression, detect_format
from .readers import ReaderParseError

# TODO: check return values for deferred callbacks
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import logging
import re

from .common import BadIP, IP, raises_errors_as
from .common import IP, BadIP, raises_errors_as

log = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion deluge/tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from deluge import error
from deluge.core.authmanager import AUTH_LEVEL_ADMIN
from deluge.ui.client import Client, client, DaemonSSLProxy
from deluge.ui.client import Client, DaemonSSLProxy, client

from . import common

Expand Down
4 changes: 2 additions & 2 deletions deluge/tests/test_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

from twisted.trial import unittest

from deluge.common import (fdate, fpcnt, fpeer, fsize, fspeed, ftime, get_path_size, is_ip, is_magnet, is_url,
setup_translations, VersionSplit)
from deluge.common import (VersionSplit, fdate, fpcnt, fpeer, fsize, fspeed, ftime, get_path_size, is_ip, is_magnet,
is_url, setup_translations)


class CommonTestCase(unittest.TestCase):
Expand Down
2 changes: 1 addition & 1 deletion deluge/ui/console/commands/status.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from twisted.internet import defer

import deluge.component as component
from deluge.common import fspeed, TORRENT_STATE
from deluge.common import TORRENT_STATE, fspeed
from deluge.ui.client import client
from deluge.ui.console.main import BaseCommand

Expand Down
2 changes: 1 addition & 1 deletion deluge/ui/console/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import deluge.common
import deluge.component as component
from deluge.ui.client import client
from deluge.ui.console import colors, UI_PATH
from deluge.ui.console import UI_PATH, colors
from deluge.ui.console.eventlog import EventLog
from deluge.ui.console.statusbars import StatusBars
from deluge.ui.coreconfig import CoreConfig
Expand Down
2 changes: 1 addition & 1 deletion deluge/ui/console/modes/torrentdetail.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from sys import maxint

import deluge.component as component
from deluge.common import fdate, FILE_PRIORITY, fsize, ftime
from deluge.common import FILE_PRIORITY, fdate, fsize, ftime
from deluge.ui.client import client
from deluge.ui.console import colors
from deluge.ui.console.modes import format_utils
Expand Down
2 changes: 1 addition & 1 deletion deluge/ui/gtkui/filtertreeview.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from gobject import GError

import deluge.component as component
from deluge.common import get_pixmap, resource_filename, TORRENT_STATE
from deluge.common import TORRENT_STATE, get_pixmap, resource_filename
from deluge.configmanager import ConfigManager
from deluge.ui.client import client

Expand Down
2 changes: 1 addition & 1 deletion deluge/ui/gtkui/listview.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

import gtk
import pygtk
from gobject import signal_new, SIGNAL_RUN_LAST, TYPE_NONE
from gobject import SIGNAL_RUN_LAST, TYPE_NONE, signal_new

from deluge.ui.gtkui.common import load_pickled_state_file, save_pickled_state_file

Expand Down
2 changes: 1 addition & 1 deletion deluge/ui/web/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
from deluge.core.rpcserver import check_ssl_keys
from deluge.ui.tracker_icons import TrackerIcons
from deluge.ui.web.auth import Auth
from deluge.ui.web.common import compress, Template
from deluge.ui.web.common import Template, compress
from deluge.ui.web.json_api import JSON, WebApi
from deluge.ui.web.pluginmanager import PluginManager

Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ known_standard_library=unicodedata
line_length=120
skip=gtkui.py
known_third_party=pygtk,gtk,gobject,gtk.gdk,pango,cairo,pangocairo
order_by_type=true
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ deps =
whitelist_externals =
{[testenv]whitelist_externals}
isort
commands = python -c "import subprocess, sys; output = subprocess.check_output('isort --recursive --diff --stdout deluge docs win32 *.py', shell=True); print output; sys.exit(len(output) != 0)"
commands = python -c "import subprocess, sys; output = subprocess.check_output('isort --stdout --diff --recursive deluge docs win32 *.py', shell=True); print output; sys.exit(len(output) != 0)"

[testenv:flake8]
setenv = {[testenv]setenv}
Expand Down

0 comments on commit dd8e37a

Please sign in to comment.