Remove some unneeded imports and old pylint workarounds

This commit is contained in:
Cole Robinson
2010-11-30 15:01:02 -05:00
parent 779dcdd824
commit 1c3e7a1ea3
24 changed files with 14 additions and 39 deletions

View File

@ -19,7 +19,6 @@
#
import gtk
import gtk.glade
def on_email(about, mail):
if hasattr(gtk, "show_uri"):

View File

@ -23,8 +23,6 @@ import traceback
import gobject
import gtk
import gtk.gdk
import gtk.glade
import virtinst
from virtinst import (VirtualCharDevice, VirtualDevice, VirtualVideoDevice,

View File

@ -21,8 +21,6 @@
import logging
import threading
import gtk
import gtk.gdk
import gtk.glade
import gobject
from virtManager import util

View File

@ -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

View File

@ -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

View File

@ -20,7 +20,7 @@
import gconf
import os
import gtk.gdk
import gtk
import libvirt
import virtinst
import logging

View File

@ -19,7 +19,7 @@
#
import gobject
import gtk.glade
import gtk
import virtinst
import logging
import dbus

View File

@ -20,7 +20,6 @@
import gobject
import gtk
import gtk.glade
import libvirt
import gtkvnc

View File

@ -20,7 +20,6 @@
import gobject
import gtk
import gtk.glade
import sys
import time

View File

@ -20,7 +20,6 @@
import gobject
import gtk
import gtk.glade
import sys
import traceback

View File

@ -20,8 +20,6 @@
import gobject
import gtk
import gtk.gdk
import gtk.glade
import logging
import re
import traceback

View File

@ -19,7 +19,7 @@
#
import gobject
import gtk.glade
import gtk
import copy
import traceback

View File

@ -19,7 +19,7 @@
#
import gobject
import gtk.glade
import gtk
import traceback
import logging

View File

@ -19,7 +19,7 @@
#
import gobject
import gtk.glade
import gtk
import os, stat
import traceback

View File

@ -20,7 +20,6 @@
import gobject
import gtk
import gtk.glade
import libvirt
import logging
import traceback

View File

@ -18,7 +18,6 @@
# MA 02110-1301 USA.
import gtk
import gtk.glade
import logging

View File

@ -16,7 +16,7 @@
#
import gobject
import gtk.glade
import gtk
import cairo
# For debugging

View File

@ -20,7 +20,6 @@
import gobject
import gtk
import gtk.glade
import traceback
import logging

View File

@ -20,7 +20,6 @@
import gobject
import gtk
import gtk.glade
import logging

View File

@ -19,7 +19,7 @@
#
import gobject
import gtk.glade
import gtk
import traceback
import logging

View File

@ -18,8 +18,8 @@
# MA 02110-1301 USA.
#
import gtk.glade
import gobject
import gtk
import virtManager.util as util

View File

@ -19,7 +19,7 @@
#
import gobject
import gtk.glade
import gtk
import traceback
import logging

View File

@ -20,7 +20,6 @@
import gobject
import gtk
import gtk.glade
from virtManager.error import vmmErrorDialog

View File

@ -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="" }