mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-08-29 09:49:33 +03:00
Remove some unneeded imports and old pylint workarounds
This commit is contained in:
@ -19,7 +19,6 @@
|
||||
#
|
||||
|
||||
import gtk
|
||||
import gtk.glade
|
||||
|
||||
def on_email(about, mail):
|
||||
if hasattr(gtk, "show_uri"):
|
||||
|
@ -23,8 +23,6 @@ import traceback
|
||||
|
||||
import gobject
|
||||
import gtk
|
||||
import gtk.gdk
|
||||
import gtk.glade
|
||||
|
||||
import virtinst
|
||||
from virtinst import (VirtualCharDevice, VirtualDevice, VirtualVideoDevice,
|
||||
|
@ -21,8 +21,6 @@
|
||||
import logging
|
||||
import threading
|
||||
import gtk
|
||||
import gtk.gdk
|
||||
import gtk.glade
|
||||
import gobject
|
||||
|
||||
from virtManager import util
|
||||
|
@ -17,7 +17,7 @@
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
# MA 02110-1301 USA.
|
||||
#
|
||||
import gtk.glade
|
||||
import gtk
|
||||
import gobject
|
||||
|
||||
import virtManager.uihelpers as uihelpers
|
||||
|
@ -23,7 +23,7 @@ import logging
|
||||
import os
|
||||
|
||||
import gobject
|
||||
import gtk.glade
|
||||
import gtk
|
||||
|
||||
from virtManager.error import vmmErrorDialog
|
||||
from virtManager.asyncjob import vmmAsyncJob
|
||||
|
@ -20,7 +20,7 @@
|
||||
import gconf
|
||||
import os
|
||||
|
||||
import gtk.gdk
|
||||
import gtk
|
||||
import libvirt
|
||||
import virtinst
|
||||
import logging
|
||||
|
@ -19,7 +19,7 @@
|
||||
#
|
||||
|
||||
import gobject
|
||||
import gtk.glade
|
||||
import gtk
|
||||
import virtinst
|
||||
import logging
|
||||
import dbus
|
||||
|
@ -20,7 +20,6 @@
|
||||
|
||||
import gobject
|
||||
import gtk
|
||||
import gtk.glade
|
||||
|
||||
import libvirt
|
||||
import gtkvnc
|
||||
|
@ -20,7 +20,6 @@
|
||||
|
||||
import gobject
|
||||
import gtk
|
||||
import gtk.glade
|
||||
|
||||
import sys
|
||||
import time
|
||||
|
@ -20,7 +20,6 @@
|
||||
|
||||
import gobject
|
||||
import gtk
|
||||
import gtk.glade
|
||||
|
||||
import sys
|
||||
import traceback
|
||||
|
@ -20,8 +20,6 @@
|
||||
|
||||
import gobject
|
||||
import gtk
|
||||
import gtk.gdk
|
||||
import gtk.glade
|
||||
import logging
|
||||
import re
|
||||
import traceback
|
||||
|
@ -19,7 +19,7 @@
|
||||
#
|
||||
|
||||
import gobject
|
||||
import gtk.glade
|
||||
import gtk
|
||||
|
||||
import copy
|
||||
import traceback
|
||||
|
@ -19,7 +19,7 @@
|
||||
#
|
||||
|
||||
import gobject
|
||||
import gtk.glade
|
||||
import gtk
|
||||
|
||||
import traceback
|
||||
import logging
|
||||
|
@ -19,7 +19,7 @@
|
||||
#
|
||||
|
||||
import gobject
|
||||
import gtk.glade
|
||||
import gtk
|
||||
|
||||
import os, stat
|
||||
import traceback
|
||||
|
@ -20,7 +20,6 @@
|
||||
|
||||
import gobject
|
||||
import gtk
|
||||
import gtk.glade
|
||||
import libvirt
|
||||
import logging
|
||||
import traceback
|
||||
|
@ -18,7 +18,6 @@
|
||||
# MA 02110-1301 USA.
|
||||
|
||||
import gtk
|
||||
import gtk.glade
|
||||
|
||||
import logging
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
#
|
||||
|
||||
import gobject
|
||||
import gtk.glade
|
||||
import gtk
|
||||
import cairo
|
||||
|
||||
# For debugging
|
||||
|
@ -20,7 +20,6 @@
|
||||
|
||||
import gobject
|
||||
import gtk
|
||||
import gtk.glade
|
||||
import traceback
|
||||
import logging
|
||||
|
||||
|
@ -20,7 +20,6 @@
|
||||
|
||||
import gobject
|
||||
import gtk
|
||||
import gtk.glade
|
||||
|
||||
import logging
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
#
|
||||
|
||||
import gobject
|
||||
import gtk.glade
|
||||
import gtk
|
||||
|
||||
import traceback
|
||||
import logging
|
||||
|
@ -18,8 +18,8 @@
|
||||
# MA 02110-1301 USA.
|
||||
#
|
||||
|
||||
import gtk.glade
|
||||
import gobject
|
||||
import gtk
|
||||
|
||||
import virtManager.util as util
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
#
|
||||
|
||||
import gobject
|
||||
import gtk.glade
|
||||
import gtk
|
||||
|
||||
import traceback
|
||||
import logging
|
||||
|
@ -20,7 +20,6 @@
|
||||
|
||||
import gobject
|
||||
import gtk
|
||||
import gtk.glade
|
||||
|
||||
from virtManager.error import vmmErrorDialog
|
||||
|
||||
|
@ -15,13 +15,8 @@ NO_PYL_CONFIG=".*No config file found.*"
|
||||
# The gettext function is installed in the builtin namespace
|
||||
GETTEXT_VAR="Undefined variable '_'"
|
||||
|
||||
# These all work fine and are legit, just false positives
|
||||
EMIT_VAR="has no 'emit' member"
|
||||
ERROR_VBOX="Class 'vbox' has no 'pack_start' member"
|
||||
EXCEPTHOOK="no '__excepthook__' member"
|
||||
CONNECT_VAR="no 'connect' member"
|
||||
DISCONNECT_VAR="no 'disconnect' member"
|
||||
UNABLE_IMPORT="Unable to import '(gtk.gdk.*|sparkline|appindicator)"
|
||||
# Optional modules that may not be available
|
||||
UNABLE_IMPORT="Unable to import '(appindicator)"
|
||||
|
||||
# os._exit is needed for forked processes.
|
||||
OS_EXIT="protected member _exit of a client class"
|
||||
@ -89,16 +84,11 @@ pylint --ignore=$IGNOREFILES $FILES \
|
||||
--disable=${DMSG}\
|
||||
--disable=${DCHECKERS} 2>&1 | \
|
||||
egrep -ve "$NO_PYL_CONFIG" \
|
||||
-ve "$EMIT_VAR" \
|
||||
-ve "$CONNECT_VAR" \
|
||||
-ve "$DISCONNECT_VAR" \
|
||||
-ve "$GETTEXT_VAR" \
|
||||
-ve "$OS_EXIT" \
|
||||
-ve "$BUILTIN_TYPE" \
|
||||
-ve "$ERROR_VBOX" \
|
||||
-ve "$UNABLE_IMPORT" \
|
||||
-ve "$INFER_ERRORS" \
|
||||
-ve "$EXCEPTHOOK" | \
|
||||
-ve "$UNABLE_IMPORT" | \
|
||||
$AWK '\
|
||||
# Strip out any "*** Module name" lines if we dont list any errors for them
|
||||
BEGIN { found=0; cur_line="" }
|
||||
|
Reference in New Issue
Block a user