summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/alias.py3
-rw-r--r--plugins/exec.py2
-rw-r--r--plugins/ping.py1
-rw-r--r--plugins/random_nick.py1
-rw-r--r--plugins/replace_word.py1
-rw-r--r--plugins/uptime.py1
-rwxr-xr-xsetup.py2
-rw-r--r--src/bookmark.py1
-rw-r--r--src/config.py7
-rw-r--r--src/connection.py4
-rw-r--r--src/contact.py1
-rw-r--r--src/core.py4
-rw-r--r--src/data_forms.py1
-rw-r--r--src/logger.py2
-rw-r--r--src/plugin_manager.py1
-rw-r--r--src/poezio.py1
-rw-r--r--src/pubsub.py2
-rw-r--r--src/tabs/basetabs.py2
-rw-r--r--src/tabs/muctab.py2
-rw-r--r--src/tabs/privatetab.py1
-rw-r--r--src/windows.py5
21 files changed, 11 insertions, 34 deletions
diff --git a/plugins/alias.py b/plugins/alias.py
index 643cfaca..e52c8d5f 100644
--- a/plugins/alias.py
+++ b/plugins/alias.py
@@ -68,9 +68,8 @@ Example of the syntax:
from plugin import BasePlugin
-import common
from common import shell_split
-from functools import partial, wraps
+
class Plugin(BasePlugin):
def init(self):
diff --git a/plugins/exec.py b/plugins/exec.py
index 6232fe8c..845bfb25 100644
--- a/plugins/exec.py
+++ b/plugins/exec.py
@@ -36,9 +36,7 @@ Usage
"""
from plugin import BasePlugin
-import os
import common
-import shlex
import subprocess
class Plugin(BasePlugin):
diff --git a/plugins/ping.py b/plugins/ping.py
index d8c6fc54..152445c8 100644
--- a/plugins/ping.py
+++ b/plugins/ping.py
@@ -25,7 +25,6 @@ Command
from plugin import BasePlugin
from roster import roster
from common import safeJID
-import common
import tabs
import time
diff --git a/plugins/random_nick.py b/plugins/random_nick.py
index a62ef23c..2c4a2f5b 100644
--- a/plugins/random_nick.py
+++ b/plugins/random_nick.py
@@ -12,7 +12,6 @@ automatically be changed to something random, for example: ::
"""
from plugin import BasePlugin
-from tabs import MucTab
from random import choice
class Plugin(BasePlugin):
diff --git a/plugins/replace_word.py b/plugins/replace_word.py
index ce685f49..2c20a309 100644
--- a/plugins/replace_word.py
+++ b/plugins/replace_word.py
@@ -17,7 +17,6 @@ Just use the word in a message. It will be replaced automatically.
"""
from plugin import BasePlugin
-import tabs
import re
class Plugin(BasePlugin):
diff --git a/plugins/uptime.py b/plugins/uptime.py
index c071b4e8..2b171703 100644
--- a/plugins/uptime.py
+++ b/plugins/uptime.py
@@ -12,7 +12,6 @@ Command
Retrieve the uptime of the server of ``jid``.
"""
from plugin import BasePlugin
-import tabs
from common import parse_secs_to_str, safeJID
from sleekxmpp.xmlstream import ET
diff --git a/setup.py b/setup.py
index 9158e676..44758725 100755
--- a/setup.py
+++ b/setup.py
@@ -4,7 +4,7 @@ try:
except ImportError:
from distutils.core import setup, Extension
-import os, sys
+import os
module_poopt = Extension('poezio.poopt',
extra_compile_args=['-Wno-declaration-after-statement'],
diff --git a/src/bookmark.py b/src/bookmark.py
index 98bfecc4..52235d23 100644
--- a/src/bookmark.py
+++ b/src/bookmark.py
@@ -8,7 +8,6 @@ bookmark storage. It can also parse xml Elements.
This module also defines several functions for retrieving and updating
bookmarks, both local and remote.
"""
-import os
import logging
from sys import version_info
diff --git a/src/config.py b/src/config.py
index 6b0acf2c..2ac85c45 100644
--- a/src/config.py
+++ b/src/config.py
@@ -12,12 +12,9 @@ from/to the config file
DEFSECTION = "Poezio"
-from gettext import gettext as _
-import sys
-import tempfile
-
-import os
import logging
+import os
+import sys
from configparser import RawConfigParser, NoOptionError, NoSectionError
from os import environ, makedirs, path, remove
diff --git a/src/connection.py b/src/connection.py
index 3010a9fe..f9e6ddfa 100644
--- a/src/connection.py
+++ b/src/connection.py
@@ -12,15 +12,11 @@ Defines the Connection class
import logging
log = logging.getLogger(__name__)
-from gettext import (bindtextdomain, textdomain, bind_textdomain_codeset,
- gettext as _)
import getpass
-import sys
import sleekxmpp
from config import config, options
-from logger import logger
import common
from common import safeJID
diff --git a/src/contact.py b/src/contact.py
index 93f2f69e..4cb4c789 100644
--- a/src/contact.py
+++ b/src/contact.py
@@ -13,7 +13,6 @@ the roster.
import logging
log = logging.getLogger(__name__)
-from sleekxmpp import JID
from common import safeJID
from collections import defaultdict
diff --git a/src/core.py b/src/core.py
index b7f6ea17..2e78005b 100644
--- a/src/core.py
+++ b/src/core.py
@@ -7,10 +7,10 @@
from gettext import gettext as _
+import curses
import os
import sys
import time
-import curses
import pipes
import ssl
@@ -27,7 +27,7 @@ import logging
import singleton
import collections
-from sleekxmpp import JID, InvalidJID
+from sleekxmpp import InvalidJID
from common import safeJID
from sleekxmpp.xmlstream.stanzabase import StanzaBase
from sleekxmpp.xmlstream.handler import Callback
diff --git a/src/data_forms.py b/src/data_forms.py
index 89781377..8de05bbd 100644
--- a/src/data_forms.py
+++ b/src/data_forms.py
@@ -11,7 +11,6 @@ Defines the data-forms Tab and all the Windows for it.
import logging
log = logging.getLogger(__name__)
-import curses
from windows import g_lock
import windows
diff --git a/src/logger.py b/src/logger.py
index 2c878606..6248cfdf 100644
--- a/src/logger.py
+++ b/src/logger.py
@@ -8,7 +8,7 @@
import mmap
import os
import re
-from os import environ, makedirs
+from os import makedirs
from datetime import datetime
import common
diff --git a/src/plugin_manager.py b/src/plugin_manager.py
index d691b3b5..45fccb10 100644
--- a/src/plugin_manager.py
+++ b/src/plugin_manager.py
@@ -8,7 +8,6 @@ plugin env.
import imp
import os
from os import path
-import sys
import logging
from gettext import gettext as _
from sys import version_info
diff --git a/src/poezio.py b/src/poezio.py
index 3245be09..7218cf13 100644
--- a/src/poezio.py
+++ b/src/poezio.py
@@ -19,7 +19,6 @@ import logging.config
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
from config import options
-from logger import logger
import singleton
import core
diff --git a/src/pubsub.py b/src/pubsub.py
index 6ef23323..55e9bc38 100644
--- a/src/pubsub.py
+++ b/src/pubsub.py
@@ -20,7 +20,7 @@ import atom_parser
from config import config
from datetime import datetime
-from sleekxmpp.xmlstream import ElementBase, ET
+from sleekxmpp.xmlstream import ET
ATOM_XMLNS = "http://www.w3.org/2005/Atom"
diff --git a/src/tabs/basetabs.py b/src/tabs/basetabs.py
index c58efc26..d4704b79 100644
--- a/src/tabs/basetabs.py
+++ b/src/tabs/basetabs.py
@@ -33,7 +33,7 @@ from common import safeJID
from config import config
from decorators import refresh_wrapper
from logger import logger
-from text_buffer import TextBuffer, CorrectionError
+from text_buffer import TextBuffer
from theming import get_theme
diff --git a/src/tabs/muctab.py b/src/tabs/muctab.py
index 5a271736..bb094bbf 100644
--- a/src/tabs/muctab.py
+++ b/src/tabs/muctab.py
@@ -15,7 +15,7 @@ log = logging.getLogger(__name__)
import curses
import os
import random
-from datetime import datetime, timedelta
+from datetime import datetime
from . import ChatTab, Tab
diff --git a/src/tabs/privatetab.py b/src/tabs/privatetab.py
index 5b9d1cee..7b050769 100644
--- a/src/tabs/privatetab.py
+++ b/src/tabs/privatetab.py
@@ -19,7 +19,6 @@ import curses
from . import ChatTab, MucTab, Tab
-import common
import fixes
import windows
import xhtml
diff --git a/src/windows.py b/src/windows.py
index fd66d475..60871821 100644
--- a/src/windows.py
+++ b/src/windows.py
@@ -12,8 +12,6 @@ the text window, the roster window, etc.
A Tab (see tab.py) is composed of multiple Windows
"""
-from gettext import (bindtextdomain, textdomain, bind_textdomain_codeset,
- gettext as _)
import logging
log = logging.getLogger(__name__)
@@ -30,7 +28,6 @@ from contact import Contact, Resource
from roster import RosterGroup
import poopt
-from sleekxmpp import JID
from common import safeJID
import common
@@ -38,7 +35,7 @@ import core
import singleton
import collections
-from theming import get_theme, to_curses_attr, read_tuple, dump_tuple
+from theming import get_theme, to_curses_attr, read_tuple
FORMAT_CHAR = '\x19'
# These are non-printable chars, so they should never appear in the input, I