Optimize imports

This commit is contained in:
enkore 2013-10-31 22:33:18 +01:00
parent 6a749bb03a
commit c43a22c46d
10 changed files with 10 additions and 20 deletions

View File

@ -8,6 +8,13 @@ from i3pystatus.core.util import formatp
__path__ = extend_path(__path__, __name__)
__all__ = [
"Status",
"Module", "IntervalModule",
"SettingsBase",
"formatp",
]
def main():
from i3pystatus.clock import Clock

View File

@ -2,7 +2,6 @@
import time
import json
import sys
import threading
from contextlib import contextmanager

View File

@ -1,14 +1,10 @@
import collections
import functools
import itertools
import re
import socket
import string
from i3pystatus.core.exceptions import *
from i3pystatus.core.imputil import ClassFinder
def lchop(string, prefix):
"""Removes a prefix from string

View File

@ -2,8 +2,6 @@
# -*- coding: utf-8 -*-
import sys
import json
from datetime import datetime, timedelta
import imaplib
from i3pystatus.mail import Backend
@ -45,7 +43,7 @@ class IMAP(Backend):
try:
self.connection.select(self.mailbox)
except Exception as e:
except Exception:
self.connection = None
return self.connection

View File

@ -4,7 +4,6 @@
# note that this needs the notmuch python bindings. For more info see:
# http://notmuchmail.org/howto/#index4h2
import notmuch
import json
from i3pystatus.mail import Backend

View File

@ -7,9 +7,6 @@
# The plugin must be active and thunderbird running for the module to work
# properly.
import json
import threading
import time
from functools import partial
import dbus

View File

@ -1,7 +1,7 @@
from i3pystatus import IntervalModule
from psutil import virtual_memory
MEGABYTE = 1024**2
MEGABYTE = 1024 * 1024
class Mem(IntervalModule):

View File

@ -1,9 +1,6 @@
#!/usr/bin/env python
import sys
import io
import pkgutil
from collections import namedtuple
import textwrap
import i3pystatus

View File

@ -1,9 +1,5 @@
#!/usr/bin/env python
import sys
import json
import time
import threading
import urllib.request
import urllib.parse
import urllib.error

View File

@ -2,6 +2,7 @@ from .pulse import *
from i3pystatus import Module
class PulseAudio(Module):
"""