Remove unused imports

This commit is contained in:
Philipp Hörist 2016-12-22 17:47:53 +01:00
parent 458d1083bc
commit ac4859fb87
28 changed files with 8 additions and 55 deletions

View File

@ -29,9 +29,6 @@
import os import os
import time import time
import gi
gi.require_version('GdkX11', '3.0')
from gi.repository import GdkX11
from gi.repository import Gtk from gi.repository import Gtk
from gi.repository import Gdk from gi.repository import Gdk
from gi.repository import GdkPixbuf from gi.repository import GdkPixbuf
@ -58,7 +55,6 @@ from message_textview import MessageTextView
from common.stanza_session import EncryptedStanzaSession, ArchivingStanzaSession from common.stanza_session import EncryptedStanzaSession, ArchivingStanzaSession
from common.contacts import GC_Contact from common.contacts import GC_Contact
from common.logger import constants from common.logger import constants
from common.pep import MOODS, ACTIVITIES
from nbxmpp.protocol import NS_XHTML, NS_XHTML_IM, NS_FILE, NS_MUC from nbxmpp.protocol import NS_XHTML, NS_XHTML_IM, NS_FILE, NS_MUC
from nbxmpp.protocol import NS_RECEIPTS, NS_ESESSION from nbxmpp.protocol import NS_RECEIPTS, NS_ESESSION
from nbxmpp.protocol import NS_JINGLE_RTP_AUDIO, NS_JINGLE_RTP_VIDEO from nbxmpp.protocol import NS_JINGLE_RTP_AUDIO, NS_JINGLE_RTP_VIDEO

View File

@ -38,7 +38,7 @@ import logging
log = logging.getLogger('gajim.c.caps_cache') log = logging.getLogger('gajim.c.caps_cache')
from nbxmpp import (NS_XHTML_IM, NS_RECEIPTS, NS_ESESSION, NS_CHATSTATES, from nbxmpp import (NS_XHTML_IM, NS_RECEIPTS, NS_ESESSION, NS_CHATSTATES,
NS_JINGLE_ICE_UDP, NS_JINGLE_RTP_AUDIO, NS_JINGLE_RTP_VIDEO, NS_CAPS, NS_JINGLE_ICE_UDP, NS_JINGLE_RTP_AUDIO, NS_JINGLE_RTP_VIDEO,
NS_JINGLE_FILE_TRANSFER) NS_JINGLE_FILE_TRANSFER)
# Features where we cannot safely assume that the other side supports them # Features where we cannot safely assume that the other side supports them
FEATURE_BLACKLIST = [NS_CHATSTATES, NS_XHTML_IM, NS_RECEIPTS, NS_ESESSION, FEATURE_BLACKLIST = [NS_CHATSTATES, NS_XHTML_IM, NS_RECEIPTS, NS_ESESSION,

View File

@ -26,7 +26,6 @@
import os import os
import shutil import shutil
import sys import sys
import stat
from common import gajim from common import gajim
from common import logger from common import logger

View File

@ -32,9 +32,7 @@
## ##
import sys
import re import re
import copy
from common import defs from common import defs
from gi.repository import GLib from gi.repository import GLib

View File

@ -24,7 +24,7 @@
## along with Gajim. If not, see <http://www.gnu.org/licenses/>. ## along with Gajim. If not, see <http://www.gnu.org/licenses/>.
## ##
import os, sys import os
from common import gajim from common import gajim
from common import exceptions from common import exceptions

View File

@ -32,7 +32,6 @@ in turn based on the Fuzzy Clock Applet of Frerich Raabe (KDE).
So most of the credit goes to this guys, thanks :-) So most of the credit goes to this guys, thanks :-)
""" """
import time
class FuzzyClock: class FuzzyClock:
HOUR_NAMES = [ _('twelve'), _('one'), _('two'), _('three'), _('four'), HOUR_NAMES = [ _('twelve'), _('one'), _('two'), _('three'), _('four'),

View File

@ -27,7 +27,6 @@
## along with Gajim. If not, see <http://www.gnu.org/licenses/>. ## along with Gajim. If not, see <http://www.gnu.org/licenses/>.
## ##
import sys
import os import os
import logging import logging
import locale import locale
@ -201,10 +200,6 @@ try:
from gi.repository import Farstream from gi.repository import Farstream
gi.require_version('Gst', '1.0') gi.require_version('Gst', '1.0')
from gi.repository import Gst from gi.repository import Gst
gi.require_version('GdkX11', '3.0')
from gi.repository import GdkX11
gi.require_version('GstVideo', '1.0')
from gi.repository import GstVideo
from gi.repository import GLib from gi.repository import GLib
try: try:
Gst.init(None) Gst.init(None)

View File

@ -31,7 +31,6 @@
import sys import sys
import re import re
import locale
import os import os
import subprocess import subprocess
import urllib import urllib

View File

@ -17,20 +17,13 @@
Handles Jingle RTP sessions (XEP 0167) Handles Jingle RTP sessions (XEP 0167)
""" """
from collections import deque
from gi.repository import GLib
import socket import socket
import nbxmpp import nbxmpp
from gi.repository import Farstream
import gi import gi
from gi.repository import Farstream
gi.require_version('Gst', '1.0') gi.require_version('Gst', '1.0')
from gi.repository import Gst from gi.repository import Gst
gi.require_version('GdkX11', '3.0')
from gi.repository import GdkX11
gi.require_version('GstVideo', '1.0')
from gi.repository import GstVideo
from gi.repository import GLib from gi.repository import GLib
from common import gajim from common import gajim
@ -40,6 +33,7 @@ from common.jingle_content import contents, JingleContent, JingleContentSetupExc
from common.connection_handlers_events import InformationEvent from common.connection_handlers_events import InformationEvent
from common.jingle_session import FailedApplication from common.jingle_session import FailedApplication
from collections import deque
import logging import logging
log = logging.getLogger('gajim.c.jingle_rtp') log = logging.getLogger('gajim.c.jingle_rtp')

View File

@ -19,7 +19,6 @@
## ##
import logging import logging
from common import i18n
def parseLogLevel(arg): def parseLogLevel(arg):
""" """

View File

@ -16,10 +16,6 @@
import gi import gi
gi.require_version('Gst', '1.0') gi.require_version('Gst', '1.0')
from gi.repository import Gst from gi.repository import Gst
gi.require_version('GdkX11', '3.0')
from gi.repository import GdkX11
gi.require_version('GstVideo', '1.0')
from gi.repository import GstVideo
class DeviceManager(object): class DeviceManager(object):

View File

@ -28,7 +28,6 @@
import os import os
import sys import sys
import locale
import re import re
from time import time from time import time
from common import gajim from common import gajim

View File

@ -18,8 +18,6 @@
## ##
import sys import sys
import os
import re
import logging import logging
import functools import functools
log = logging.getLogger('gajim.c.resolver') log = logging.getLogger('gajim.c.resolver')
@ -30,8 +28,6 @@ if __name__ == '__main__':
import common.configpaths import common.configpaths
common.configpaths.gajimpaths.init(None) common.configpaths.gajimpaths.init(None)
from common import helpers
from nbxmpp.idlequeue import IdleCommand
from gi.repository import Gio, GLib from gi.repository import Gio, GLib
@ -132,7 +128,6 @@ class GioResolver(CommonResolver):
# below lines is on how to use API and assist in testing # below lines is on how to use API and assist in testing
if __name__ == '__main__': if __name__ == '__main__':
from gi.repository import GLib
from gi.repository import Gtk from gi.repository import Gtk
from nbxmpp import idlequeue from nbxmpp import idlequeue

View File

@ -23,7 +23,6 @@
from common import gajim from common import gajim
import os import os
import sys
STATE_UNKNOWN = 'OS probably not supported' STATE_UNKNOWN = 'OS probably not supported'

View File

@ -36,7 +36,7 @@ from gi.repository import Gdk
from gi.repository import Pango from gi.repository import Pango
from gi.repository import GObject from gi.repository import GObject
from gi.repository import GLib from gi.repository import GLib
import os, sys import os
import common.config import common.config
import common.sleepy import common.sleepy
from common.i18n import Q_ from common.i18n import Q_

View File

@ -39,7 +39,6 @@ import time
import os import os
import tooltips import tooltips
import dialogs import dialogs
import locale
import queue import queue
import urllib import urllib

View File

@ -42,7 +42,6 @@ import time
import gtkgui_helpers import gtkgui_helpers
import vcard import vcard
import conversation_textview import conversation_textview
import message_control
import dataforms_widget import dataforms_widget
from common import defs from common import defs

View File

@ -44,7 +44,6 @@
# the functionality) # the functionality)
# There are more methods, of course, but this is a basic set. # There are more methods, of course, but this is a basic set.
import os
import types import types
import weakref import weakref
from gi.repository import GLib from gi.repository import GLib

View File

@ -24,7 +24,6 @@
## ##
import os import os
import sys
import gi import gi
from gi.repository import Gtk from gi.repository import Gtk
import gtkgui_helpers import gtkgui_helpers

View File

@ -36,13 +36,11 @@ from gi.repository import GLib
from gi.repository import Pango from gi.repository import Pango
import os import os
import sys import sys
import importlib
try: try:
from PIL import Image from PIL import Image
except: except:
pass pass
from io import BytesIO from io import BytesIO
import array
import logging import logging
log = logging.getLogger('gajim.gtkgui_helpers') log = logging.getLogger('gajim.gtkgui_helpers')

View File

@ -52,7 +52,6 @@ import signal
import gi import gi
gi.require_version('Gtk', '3.0') gi.require_version('Gtk', '3.0')
from gi.repository import Gtk from gi.repository import Gtk
gi.require_version('GdkX11', '3.0')
from gi.repository import Gdk from gi.repository import Gdk
from gi.repository import GLib from gi.repository import GLib
import time import time

View File

@ -41,11 +41,11 @@ from gi.repository import Pango
from gi.repository import Gtk from gi.repository import Gtk
from gi.repository import Gdk from gi.repository import Gdk
from gi.repository import GdkPixbuf from gi.repository import GdkPixbuf
import xml.sax, xml.sax.handler import xml.sax
import xml.sax.handler
import re import re
from io import StringIO from io import StringIO
import urllib import urllib
import operator
if __name__ == '__main__': if __name__ == '__main__':
from common import i18n from common import i18n

View File

@ -24,12 +24,10 @@
import gc import gc
from gi.repository import Gtk from gi.repository import Gtk
from gi.repository import Gdk
from gi.repository import GObject from gi.repository import GObject
from gi.repository import GLib from gi.repository import GLib
from gi.repository import Pango from gi.repository import Pango
import gtkgui_helpers
from common import gajim from common import gajim
class MessageTextView(Gtk.TextView): class MessageTextView(Gtk.TextView):

View File

@ -21,7 +21,6 @@
## along with Gajim. If not, see <http://www.gnu.org/licenses/>. ## along with Gajim. If not, see <http://www.gnu.org/licenses/>.
## ##
import sys
from common import gajim from common import gajim

View File

@ -33,7 +33,6 @@ from dialogs import PopupNotificationWindow
from gi.repository import GObject from gi.repository import GObject
from gi.repository import GLib from gi.repository import GLib
import gtkgui_helpers import gtkgui_helpers
from gi.repository import Gtk
from common import gajim from common import gajim
from common import helpers from common import helpers

View File

@ -74,7 +74,6 @@ if dbus_support.supported:
import dbus import dbus
from nbxmpp.protocol import NS_FILE, NS_ROSTERX, NS_CONFERENCE from nbxmpp.protocol import NS_FILE, NS_ROSTERX, NS_CONFERENCE
from common.pep import MOODS, ACTIVITIES
#(icon, name, type, jid, account, editable, second pixbuf) #(icon, name, type, jid, account, editable, second pixbuf)
( (

View File

@ -23,7 +23,6 @@
## along with Gajim. If not, see <http://www.gnu.org/licenses/>. ## along with Gajim. If not, see <http://www.gnu.org/licenses/>.
## ##
import sys
from gi.repository import Gtk from gi.repository import Gtk
from gi.repository import Gdk from gi.repository import Gdk
from gi.repository import GObject from gi.repository import GObject
@ -33,7 +32,6 @@ import dialogs
import config import config
import tooltips import tooltips
import gtkgui_helpers import gtkgui_helpers
import tooltips
from common import gajim from common import gajim
from common import helpers from common import helpers

View File

@ -33,7 +33,6 @@ from gi.repository import Gdk
from gi.repository import GLib from gi.repository import GLib
import os import os
import time import time
import locale
from datetime import datetime from datetime import datetime
from datetime import timedelta from datetime import timedelta