From eb9f340a0391c7f26d1d8afc18c0d9fc4d30313f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20H=C3=B6rist?= Date: Thu, 3 Jan 2019 10:18:15 +0100 Subject: [PATCH] Remove star imports --- gajim/common/connection.py | 15 ++++++++-- gajim/common/connection_handlers.py | 6 +++- gajim/common/zeroconf/client_zeroconf.py | 31 ++++++++++---------- gajim/common/zeroconf/connection_zeroconf.py | 11 +++++-- 4 files changed, 43 insertions(+), 20 deletions(-) diff --git a/gajim/common/connection.py b/gajim/common/connection.py index 4f2ed6c3d..be22fd603 100644 --- a/gajim/common/connection.py +++ b/gajim/common/connection.py @@ -58,11 +58,22 @@ from gajim.common import app from gajim.common import gpg from gajim.common import passwords from gajim.common import idle +from gajim.common import modules +from gajim.common import ged from gajim.common.nec import NetworkEvent from gajim.common.i18n import _ -from gajim.common.connection_handlers import * from gajim.common.contacts import GC_Contact -from gajim.common import modules +from gajim.common.connection_handlers import ConnectionHandlers +from gajim.common.connection_handlers_events import OurShowEvent +from gajim.common.connection_handlers_events import BadGPGPassphraseEvent +from gajim.common.connection_handlers_events import GPGPasswordRequiredEvent +from gajim.common.connection_handlers_events import InformationEvent +from gajim.common.connection_handlers_events import StanzaMessageOutgoingEvent +from gajim.common.connection_handlers_events import GcStanzaMessageOutgoingEvent +from gajim.common.connection_handlers_events import ConnectionLostEvent +from gajim.common.connection_handlers_events import NewAccountConnectedEvent +from gajim.common.connection_handlers_events import NewAccountNotConnectedEvent +from gajim.common.connection_handlers_events import MessageSentEvent log = logging.getLogger('gajim.c.connection') diff --git a/gajim/common/connection_handlers.py b/gajim/common/connection_handlers.py index 99be3772b..9baa6a60d 100644 --- a/gajim/common/connection_handlers.py +++ b/gajim/common/connection_handlers.py @@ -34,11 +34,15 @@ from gajim.common import ged from gajim.common import helpers from gajim.common import jingle_xtls from gajim.common.caps_cache import muc_caps_cache -from gajim.common.connection_handlers_events import * from gajim.common.const import KindConstant from gajim.common.jingle import ConnectionJingle from gajim.common.protocol.bytestream import ConnectionSocks5Bytestream from gajim.common.protocol.bytestream import ConnectionIBBytestream +from gajim.common.connection_handlers_events import StreamReceivedEvent +from gajim.common.connection_handlers_events import MessageErrorEvent +from gajim.common.connection_handlers_events import PresenceReceivedEvent +from gajim.common.connection_handlers_events import StreamConflictReceivedEvent +from gajim.common.connection_handlers_events import NotificationEvent log = logging.getLogger('gajim.c.connection_handlers') diff --git a/gajim/common/zeroconf/client_zeroconf.py b/gajim/common/zeroconf/client_zeroconf.py index 834089ecc..8f3e2b2f2 100644 --- a/gajim/common/zeroconf/client_zeroconf.py +++ b/gajim/common/zeroconf/client_zeroconf.py @@ -15,18 +15,6 @@ # You should have received a copy of the GNU General Public License # along with Gajim. If not, see . -from unittest.mock import Mock - -from gajim.common import app -import nbxmpp -from nbxmpp.idlequeue import IdleObject -from nbxmpp import dispatcher_nb, simplexml -from nbxmpp.plugin import PlugIn -from nbxmpp.plugin import * -from nbxmpp.transports_nb import DATA_RECEIVED, DATA_SENT, DATA_ERROR -from gajim.common.zeroconf import zeroconf - -from nbxmpp.protocol import * import socket import platform import ssl @@ -34,12 +22,25 @@ import errno import sys import os import string -from random import Random - import logging +from random import Random +from unittest.mock import Mock + +import nbxmpp +from nbxmpp import dispatcher_nb +from nbxmpp import simplexml +from nbxmpp.plugin import PlugIn +from nbxmpp.idlequeue import IdleObject +from nbxmpp.transports_nb import DATA_RECEIVED +from nbxmpp.transports_nb import DATA_SENT +from nbxmpp.transports_nb import DATA_ERROR + +from gajim.common import app +from gajim.common.zeroconf import zeroconf +from gajim.common.zeroconf import roster_zeroconf + log = logging.getLogger('gajim.c.z.client_zeroconf') -from gajim.common.zeroconf import roster_zeroconf MAX_BUFF_LEN = 65536 TYPE_SERVER, TYPE_CLIENT = range(2) diff --git a/gajim/common/zeroconf/connection_zeroconf.py b/gajim/common/zeroconf/connection_zeroconf.py index 7c487cf6a..70f02079c 100644 --- a/gajim/common/zeroconf/connection_zeroconf.py +++ b/gajim/common/zeroconf/connection_zeroconf.py @@ -29,6 +29,8 @@ import socket import getpass +import logging +import time import nbxmpp from gi.repository import GLib @@ -41,8 +43,13 @@ from gajim.common.i18n import _ from gajim.common.connection import CommonConnection from gajim.common.zeroconf import client_zeroconf from gajim.common.zeroconf import zeroconf -from gajim.common.zeroconf.connection_handlers_zeroconf import * -from gajim.common.connection_handlers_events import * +from gajim.common.zeroconf.connection_handlers_zeroconf import ConnectionHandlersZeroconf +from gajim.common.zeroconf.connection_handlers_zeroconf import STATUS_LIST +from gajim.common.connection_handlers_events import OurShowEvent +from gajim.common.connection_handlers_events import InformationEvent +from gajim.common.connection_handlers_events import ConnectionLostEvent +from gajim.common.connection_handlers_events import MessageSentEvent +from gajim.common.connection_handlers_events import MessageErrorEvent log = logging.getLogger('gajim.c.connection_zeroconf')