From 7ef066b181529e16ab84e571bc9fc5f4b4429dda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20H=C3=B6rist?= Date: Sun, 7 Apr 2019 21:29:45 +0200 Subject: [PATCH] Fix ungrouped-imports pylint errors --- gajim/chat_control_base.py | 2 +- gajim/common/dbus/location.py | 2 +- gajim/dev/ipython_view.py | 2 ++ gajim/gtk/preferences.py | 2 +- gajim/gtk/single_message.py | 2 +- gajim/message_textview.py | 2 +- scripts/dev/pylint-ci.sh | 3 +-- 7 files changed, 8 insertions(+), 7 deletions(-) diff --git a/gajim/chat_control_base.py b/gajim/chat_control_base.py index 340dfb279..d2d250b5d 100644 --- a/gajim/chat_control_base.py +++ b/gajim/chat_control_base.py @@ -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 ################################################################################ diff --git a/gajim/common/dbus/location.py b/gajim/common/dbus/location.py index 779854301..09f72008d 100644 --- a/gajim/common/dbus/location.py +++ b/gajim/common/dbus/location.py @@ -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') diff --git a/gajim/dev/ipython_view.py b/gajim/dev/ipython_view.py index f5a3811f3..3ec72248d 100644 --- a/gajim/dev/ipython_view.py +++ b/gajim/dev/ipython_view.py @@ -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): diff --git a/gajim/gtk/preferences.py b/gajim/gtk/preferences.py index f0b4bf776..3d477c052 100644 --- a/gajim/gtk/preferences.py +++ b/gajim/gtk/preferences.py @@ -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): diff --git a/gajim/gtk/single_message.py b/gajim/gtk/single_message.py index fb6f39bc3..338b71848 100644 --- a/gajim/gtk/single_message.py +++ b/gajim/gtk/single_message.py @@ -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: diff --git a/gajim/message_textview.py b/gajim/message_textview.py index df24a3442..b5a957557 100644 --- a/gajim/message_textview.py +++ b/gajim/message_textview.py @@ -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): diff --git a/scripts/dev/pylint-ci.sh b/scripts/dev/pylint-ci.sh index f2a11d623..2eb53879d 100755 --- a/scripts/dev/pylint-ci.sh +++ b/scripts/dev/pylint-ci.sh @@ -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