Optimize imports
This commit is contained in:
parent
6a749bb03a
commit
c43a22c46d
@ -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
|
||||
|
@ -2,7 +2,6 @@
|
||||
import time
|
||||
import json
|
||||
import sys
|
||||
import threading
|
||||
from contextlib import contextmanager
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -1,7 +1,7 @@
|
||||
from i3pystatus import IntervalModule
|
||||
from psutil import virtual_memory
|
||||
|
||||
MEGABYTE = 1024**2
|
||||
MEGABYTE = 1024 * 1024
|
||||
|
||||
|
||||
class Mem(IntervalModule):
|
||||
|
@ -1,9 +1,6 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import sys
|
||||
import io
|
||||
import pkgutil
|
||||
from collections import namedtuple
|
||||
import textwrap
|
||||
|
||||
import i3pystatus
|
||||
|
@ -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
|
||||
|
@ -2,6 +2,7 @@ from .pulse import *
|
||||
|
||||
from i3pystatus import Module
|
||||
|
||||
|
||||
class PulseAudio(Module):
|
||||
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user