[Tests] Fix code for isort 4.0.0
This commit is contained in:
parent
379ba33bb9
commit
9d662bf059
|
@ -1,4 +1,5 @@
|
|||
"""Deluge"""
|
||||
# this is a namespace package
|
||||
import pkg_resources
|
||||
|
||||
pkg_resources.declare_namespace(__name__)
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# this is a namespace package
|
||||
import pkg_resources
|
||||
|
||||
pkg_resources.declare_namespace(__name__)
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# this is a namespace package
|
||||
import pkg_resources
|
||||
|
||||
pkg_resources.declare_namespace(__name__)
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# this is a namespace package
|
||||
import pkg_resources
|
||||
|
||||
pkg_resources.declare_namespace(__name__)
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# this is a namespace package
|
||||
import pkg_resources
|
||||
|
||||
pkg_resources.declare_namespace(__name__)
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# this is a namespace package
|
||||
import pkg_resources
|
||||
|
||||
pkg_resources.declare_namespace(__name__)
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# this is a namespace package
|
||||
import pkg_resources
|
||||
|
||||
pkg_resources.declare_namespace(__name__)
|
||||
|
|
|
@ -17,10 +17,11 @@ import gtk
|
|||
import gtk.glade
|
||||
|
||||
import deluge.component as component
|
||||
from .common import get_resource
|
||||
from deluge.plugins.pluginbase import GtkPluginBase
|
||||
from deluge.ui.client import client
|
||||
|
||||
from .common import get_resource
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# this is a namespace package
|
||||
import pkg_resources
|
||||
|
||||
pkg_resources.declare_namespace(__name__)
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# this is a namespace package
|
||||
import pkg_resources
|
||||
|
||||
pkg_resources.declare_namespace(__name__)
|
||||
|
|
|
@ -8,12 +8,11 @@
|
|||
#
|
||||
|
||||
import logging
|
||||
|
||||
from deluge import component # for systray
|
||||
from deluge.plugins.pluginbase import GtkPluginBase
|
||||
|
||||
from . import sidebar_menu
|
||||
from . import label_config
|
||||
from . import submenu
|
||||
from . import label_config, sidebar_menu, submenu
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# this is a namespace package
|
||||
import pkg_resources
|
||||
|
||||
pkg_resources.declare_namespace(__name__)
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# this is a namespace package
|
||||
import pkg_resources
|
||||
|
||||
pkg_resources.declare_namespace(__name__)
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# this is a namespace package
|
||||
import pkg_resources
|
||||
|
||||
pkg_resources.declare_namespace(__name__)
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# this is a namespace package
|
||||
import pkg_resources
|
||||
|
||||
pkg_resources.declare_namespace(__name__)
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# this is a namespace package
|
||||
import pkg_resources
|
||||
|
||||
pkg_resources.declare_namespace(__name__)
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# this is a namespace package
|
||||
import pkg_resources
|
||||
|
||||
pkg_resources.declare_namespace(__name__)
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# this is a namespace package
|
||||
import pkg_resources
|
||||
|
||||
pkg_resources.declare_namespace(__name__)
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# this is a namespace package
|
||||
import pkg_resources
|
||||
|
||||
pkg_resources.declare_namespace(__name__)
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# this is a namespace package
|
||||
import pkg_resources
|
||||
|
||||
pkg_resources.declare_namespace(__name__)
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# this is a namespace package
|
||||
import pkg_resources
|
||||
|
||||
pkg_resources.declare_namespace(__name__)
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# this is a namespace package
|
||||
import pkg_resources
|
||||
|
||||
pkg_resources.declare_namespace(__name__)
|
||||
|
|
|
@ -4,12 +4,13 @@ import warnings
|
|||
|
||||
from twisted.trial import unittest
|
||||
|
||||
import common
|
||||
from deluge import component
|
||||
from deluge.core.core import Core
|
||||
from deluge.core.rpcserver import RPCServer
|
||||
from deluge.error import InvalidTorrentError
|
||||
|
||||
from . import common
|
||||
|
||||
warnings.filterwarnings("ignore", category=RuntimeWarning)
|
||||
warnings.resetwarnings()
|
||||
|
||||
|
|
|
@ -9,4 +9,5 @@
|
|||
|
||||
UI_PATH = __path__[0]
|
||||
from deluge.ui.console.main import start
|
||||
|
||||
assert start # silence pyflakes
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
from deluge.ui.gtkui.gtkui import start
|
||||
|
||||
assert start # silence pyflakes
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
# the additional special exception to link portions of this program with the OpenSSL library.
|
||||
# See LICENSE for more details.
|
||||
#
|
||||
# We skip isorting this file as it want to move the gtk2reactor.install() below the imports
|
||||
# isort:skip_file
|
||||
|
||||
import logging
|
||||
import os
|
||||
|
@ -18,7 +20,8 @@ from twisted.internet import gtk2reactor
|
|||
from twisted.internet.error import ReactorAlreadyInstalledError
|
||||
|
||||
try:
|
||||
reactor = gtk2reactor.install() # Install twisted reactor, before any other modules import reactor.
|
||||
# Install twisted reactor, before any other modules import reactor.
|
||||
reactor = gtk2reactor.install()
|
||||
except ReactorAlreadyInstalledError:
|
||||
# Running unit tests so trial already installed a rector
|
||||
pass
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
from deluge.ui.web.web import start
|
||||
|
||||
assert start # silence pyflakes
|
||||
|
|
|
@ -15,8 +15,10 @@ includes = glib, gio, cairo, pango, pangocairo, atk, gobject, gtk.keysyms,
|
|||
frameworks = CoreFoundation, Foundation, AppKit
|
||||
|
||||
[isort]
|
||||
default_section=THIRDPARTY
|
||||
known_standard_library=unicodedata
|
||||
line_length=120
|
||||
skip=gtkui.py
|
||||
known_third_party=pygtk,gtk,gobject,gtk.gdk,pango,cairo,pangocairo,twisted
|
||||
known_third_party=pygtk,gtk,gobject,gtk.gdk,pango,cairo,pangocairo,twisted,pytest,OpenSSL,pkg_resources,chardet
|
||||
known_first_party=msgfmt,
|
||||
order_by_type=true
|
||||
line_length=120
|
||||
not_skip=__init__.py
|
||||
|
|
3
setup.py
3
setup.py
|
@ -200,9 +200,10 @@ class CleanPlugins(cmd.Command):
|
|||
|
||||
for path in glob.glob(plugin_path):
|
||||
if os.path.exists(os.path.join(path, "setup.py")):
|
||||
c = "cd " + path + "&& " + sys.executable + " setup.py clean"
|
||||
c = "cd " + path + " && " + sys.executable + " setup.py clean"
|
||||
if self.all:
|
||||
c += " -a"
|
||||
print("Calling '%s'" % c)
|
||||
os.system(c)
|
||||
|
||||
# Delete the .eggs
|
||||
|
|
2
tox.ini
2
tox.ini
|
@ -78,7 +78,7 @@ commands = {[testenv:pydef]commands}
|
|||
[testenv:isort]
|
||||
deps =
|
||||
{[testenv]deps}
|
||||
isort
|
||||
isort>=4.0.0
|
||||
whitelist_externals =
|
||||
{[testenv]whitelist_externals}
|
||||
isort
|
||||
|
|
|
@ -3,13 +3,13 @@ import os
|
|||
import shutil
|
||||
import sys
|
||||
|
||||
import gtk
|
||||
|
||||
import bbfreeze.recipes
|
||||
import deluge.common
|
||||
import gtk
|
||||
import icon
|
||||
from bbfreeze import Freezer
|
||||
|
||||
import deluge.common
|
||||
|
||||
# Get build_version from installed deluge
|
||||
build_version = deluge.common.get_version()
|
||||
print "Deluge Version: %s" % build_version
|
||||
|
|
Loading…
Reference in New Issue