From: Michael Tremer Date: Sun, 20 Sep 2020 14:40:05 +0000 (+0000) Subject: Tidy up imports of other modules X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a031204a4bb1a81a2d0c9b530978bf6781cba790;p=telemetry.git Tidy up imports of other modules Signed-off-by: Michael Tremer --- diff --git a/src/collecty/bus.py b/src/collecty/bus.py index a2990d2..8ad28fc 100644 --- a/src/collecty/bus.py +++ b/src/collecty/bus.py @@ -27,8 +27,8 @@ import gi.repository.GObject import logging import threading -from .constants import * from .i18n import _ +from .constants import * log = logging.getLogger("collecty.bus") diff --git a/src/collecty/plugins/conntrack.py b/src/collecty/plugins/conntrack.py index 2e24585..8e4b058 100644 --- a/src/collecty/plugins/conntrack.py +++ b/src/collecty/plugins/conntrack.py @@ -24,7 +24,6 @@ import os from . import base from ..colours import * -from ..i18n import _ CONNTRACK_FILE = "/proc/net/nf_conntrack" diff --git a/src/collecty/plugins/contextswitches.py b/src/collecty/plugins/contextswitches.py index 8242de0..0031a74 100644 --- a/src/collecty/plugins/contextswitches.py +++ b/src/collecty/plugins/contextswitches.py @@ -24,7 +24,6 @@ import re from . import base from ..colours import * -from ..i18n import _ class GraphTemplateContextSwitches(base.GraphTemplate): name = "context-switches" diff --git a/src/collecty/plugins/cpufreq.py b/src/collecty/plugins/cpufreq.py index c610891..c2ce9b4 100644 --- a/src/collecty/plugins/cpufreq.py +++ b/src/collecty/plugins/cpufreq.py @@ -24,8 +24,6 @@ import re from . import base -from ..i18n import _ - class GraphTemplateCPUFreq(base.GraphTemplate): name = "cpufreq" diff --git a/src/collecty/plugins/df.py b/src/collecty/plugins/df.py index 46fc057..ae6a27f 100644 --- a/src/collecty/plugins/df.py +++ b/src/collecty/plugins/df.py @@ -19,14 +19,13 @@ # # ############################################################################### -from collecty import _collecty import os -from ..constants import * -from ..colours import * +from .. import _collecty from . import base -from ..i18n import _ +from ..constants import * +from ..colours import * class GraphTemplateDiskUsage(base.GraphTemplate): name = "disk-usage" diff --git a/src/collecty/plugins/disk.py b/src/collecty/plugins/disk.py index 8b66cee..79083ee 100644 --- a/src/collecty/plugins/disk.py +++ b/src/collecty/plugins/disk.py @@ -19,14 +19,13 @@ # # ############################################################################### -from collecty import _collecty import os import re +from .. import _collecty from . import base from ..colours import * -from ..i18n import _ class GraphTemplateDiskBadSectors(base.GraphTemplate): name = "disk-bad-sectors" diff --git a/src/collecty/plugins/interface.py b/src/collecty/plugins/interface.py index 8be11cb..b1dfe34 100644 --- a/src/collecty/plugins/interface.py +++ b/src/collecty/plugins/interface.py @@ -21,11 +21,10 @@ import os -from . import base from .. import util -from ..colours import * +from . import base -from ..i18n import _ +from ..colours import * class GraphTemplateInterfaceBase(base.GraphTemplate): @property diff --git a/src/collecty/plugins/interrupts.py b/src/collecty/plugins/interrupts.py index 54da102..b8cacd1 100644 --- a/src/collecty/plugins/interrupts.py +++ b/src/collecty/plugins/interrupts.py @@ -24,7 +24,6 @@ import re from . import base from ..colours import * -from ..i18n import _ class GraphTemplateSystemInterrupts(base.GraphTemplate): name = "system-interrupts" diff --git a/src/collecty/plugins/ipfrag.py b/src/collecty/plugins/ipfrag.py index a70d8fb..6d60571 100644 --- a/src/collecty/plugins/ipfrag.py +++ b/src/collecty/plugins/ipfrag.py @@ -24,9 +24,8 @@ import os from .. import util from . import base -from ..colours import * +from ..colours import * from ..constants import * -from ..i18n import _ class GraphTemplateIPv6Fragmentation(base.GraphTemplate): name = "ipv6-fragmentation" diff --git a/src/collecty/plugins/latency.py b/src/collecty/plugins/latency.py index a4be42e..388413d 100644 --- a/src/collecty/plugins/latency.py +++ b/src/collecty/plugins/latency.py @@ -21,11 +21,11 @@ import socket +from .. import _collecty +from ..i18n import _ from . import base -from .. import _collecty from ..colours import * -from ..i18n import _ PING_HOSTS = [ # gateway is a special name that is automatically diff --git a/src/collecty/plugins/loadavg.py b/src/collecty/plugins/loadavg.py index bf9cef2..7e9aee2 100644 --- a/src/collecty/plugins/loadavg.py +++ b/src/collecty/plugins/loadavg.py @@ -24,7 +24,6 @@ import os from . import base from ..colours import * -from ..i18n import _ class GraphTemplateLoadAvg(base.GraphTemplate): name = "loadavg" diff --git a/src/collecty/plugins/memory.py b/src/collecty/plugins/memory.py index 65b56de..01e4d66 100644 --- a/src/collecty/plugins/memory.py +++ b/src/collecty/plugins/memory.py @@ -21,7 +21,6 @@ from . import base -from ..i18n import _ from ..colours import * class GraphTemplateMemory(base.GraphTemplate): diff --git a/src/collecty/plugins/processor.py b/src/collecty/plugins/processor.py index 30039c3..bf37b75 100644 --- a/src/collecty/plugins/processor.py +++ b/src/collecty/plugins/processor.py @@ -22,7 +22,6 @@ from . import base from ..colours import * -from ..i18n import _ class GraphTemplateProcessor(base.GraphTemplate): name = "processor" diff --git a/src/collecty/plugins/sensors.py b/src/collecty/plugins/sensors.py index 56acca4..e0d4d7e 100644 --- a/src/collecty/plugins/sensors.py +++ b/src/collecty/plugins/sensors.py @@ -20,14 +20,12 @@ # # ############################################################################### -from collecty import _collecty import os import re +from .. import _collecty from . import base -from ..i18n import _ - class GraphTemplateSensorsTemperature(base.GraphTemplate): name = "sensors-temperature"