Fix ungrouped-imports pylint errors

This commit is contained in:
Philipp Hörist 2019-04-07 21:29:45 +02:00
parent cf40a2a8ef
commit 7ef066b181
7 changed files with 8 additions and 7 deletions

View File

@ -75,7 +75,7 @@ from gajim.command_system.implementation import execute
# pylint: enable=unused-import
if app.is_installed('GSPELL'):
from gi.repository import Gspell
from gi.repository import Gspell # pylint: disable=ungrouped-imports
################################################################################

View File

@ -23,7 +23,7 @@ from nbxmpp.structs import LocationData
from gajim.common import app
if app.is_installed('GEOCLUE'):
from gi.repository import Geoclue
from gi.repository import Geoclue # pylint: disable=ungrouped-imports
log = logging.getLogger('gajim.c.dbus.location')

View File

@ -60,8 +60,10 @@ except ImportError:
HAS_IPYTHON5 = True
try:
from pygments.token import Token
# pylint: disable=ungrouped-imports
from IPython.core.displayhook import DisplayHook
from IPython.core.display_trap import DisplayTrap
# pylint: enable=ungrouped-imports
class MyPromptDisplayHook(DisplayHook):
def __init__(self, shell, view):

View File

@ -47,7 +47,7 @@ except (ImportError, ValueError):
HAS_GST = False
if app.is_installed('GSPELL'):
from gi.repository import Gspell
from gi.repository import Gspell # pylint: disable=ungrouped-imports
class Preferences(Gtk.ApplicationWindow):

View File

@ -34,7 +34,7 @@ from gajim.gtk.util import move_window
from gajim.gtk.util import resize_window
if app.is_installed('GSPELL'):
from gi.repository import Gspell
from gi.repository import Gspell # pylint: disable=ungrouped-imports
class SingleMessageWindow:

View File

@ -31,7 +31,7 @@ from gajim.common.const import StyleAttr
from gajim.gtk.util import scroll_to_end
if app.is_installed('GSPELL'):
from gi.repository import Gspell
from gi.repository import Gspell # pylint: disable=ungrouped-imports
class MessageTextView(Gtk.TextView):

View File

@ -1,13 +1,12 @@
#!/bin/sh
PYLINT=${PYLINT:-pylint}
"$PYLINT" --disable=C0103,C0302,C0301,C0330,C0412,E0203,E0401,E0611,E0710,E0712,E1101,E1102,E1133,E1136,R0201,R0901,R0904,R0912,R0913,R0914,R0915,R0916,R1702,R1710,W0201,W0212,W0221,W0223,W0231,W0233,W0311,W0401,W0603,W0613 "$@"
"$PYLINT" --disable=C0103,C0302,C0301,C0330,E0203,E0401,E0611,E0710,E0712,E1101,E1102,E1133,E1136,R0201,R0901,R0904,R0912,R0913,R0914,R0915,R0916,R1702,R1710,W0201,W0212,W0221,W0223,W0231,W0233,W0311,W0401,W0603,W0613 "$@"
# C0103 invalid-name
# C0301 line-too-long
# C0302 too-many-lines
# C0330 bad-continuation
# C0412 ungrouped-imports
# E0203 access-member-before-definition
# E0401 import-error
# E0611 no-name-in-module