Import cleanup

This commit is contained in:
itdominator 2023-01-29 00:06:52 -06:00
parent bd6076b4e7
commit b8306a9c4d
12 changed files with 25 additions and 16 deletions

View File

@ -1,5 +1,8 @@
# Python imports # Python imports
import os, threading, subprocess, time import os
import threading
import subprocess
import time
# Lib imports # Lib imports
import gi import gi
@ -10,6 +13,8 @@ from gi.repository import Gtk
from plugins.plugin_base import PluginBase from plugins.plugin_base import PluginBase
# NOTE: Threads WILL NOT die with parent's destruction. # NOTE: Threads WILL NOT die with parent's destruction.
def threaded(fn): def threaded(fn):
def wrapper(*args, **kwargs): def wrapper(*args, **kwargs):

View File

@ -1,8 +1,6 @@
import builtins
import threading
# Python imports # Python imports
import builtins import builtins
import threading
# Lib imports # Lib imports
@ -14,6 +12,7 @@ from utils.settings import Settings
# NOTE: Threads WILL NOT die with parent's destruction. # NOTE: Threads WILL NOT die with parent's destruction.
def threaded_wrapper(fn): def threaded_wrapper(fn):
def wrapper(*args, **kwargs): def wrapper(*args, **kwargs):

View File

@ -9,7 +9,6 @@ from setproctitle import setproctitle
import tracemalloc import tracemalloc
tracemalloc.start() tracemalloc.start()
# Lib imports # Lib imports
import gi import gi
gi.require_version('Gtk', '3.0') gi.require_version('Gtk', '3.0')
@ -20,6 +19,8 @@ from __builtins__ import *
from app import Application from app import Application
if __name__ == "__main__": if __name__ == "__main__":
''' Set process title, get arguments, and create GTK main thread. ''' ''' Set process title, get arguments, and create GTK main thread. '''

View File

@ -10,6 +10,7 @@ from core.window import Window
class AppLaunchException(Exception): class AppLaunchException(Exception):
... ...

View File

@ -1,12 +1,10 @@
# Python imports # Python imports
import subprocess import subprocess
# Gtk imports # Lib imports
import gi import gi
gi.require_version('Gtk', '3.0') gi.require_version('Gtk', '3.0')
gi.require_version('Gdk', '3.0') gi.require_version('Gdk', '3.0')
from gi.repository import Gtk from gi.repository import Gtk
from gi.repository import Gdk from gi.repository import Gdk
from gi.repository import GLib from gi.repository import GLib
@ -18,6 +16,7 @@ from .core_widget import CoreWidget
class Controller(DummyMixin, ControllerData): class Controller(DummyMixin, ControllerData):
def __init__(self, args, unknownargs): def __init__(self, args, unknownargs):
self._setup_styling() self._setup_styling()

View File

@ -8,6 +8,7 @@ from plugins.plugins_controller import PluginsController
class ControllerData: class ControllerData:
''' ControllerData contains most of the state of the app at ay given time. It also has some support methods. ''' ''' ControllerData contains most of the state of the app at ay given time. It also has some support methods. '''

View File

@ -1,15 +1,15 @@
# Python imports # Python imports
# Gtk imports # Lib imports
import gi import gi
gi.require_version('Gtk', '3.0') gi.require_version('Gtk', '3.0')
from gi.repository import Gtk from gi.repository import Gtk
# Application imports # Application imports
class CoreWidget(Gtk.Box): class CoreWidget(Gtk.Box):
def __init__(self): def __init__(self):
super(CoreWidget, self).__init__() super(CoreWidget, self).__init__()

View File

@ -5,10 +5,8 @@ import signal
# Lib imports # Lib imports
import gi import gi
import cairo import cairo
gi.require_version('Gtk', '3.0') gi.require_version('Gtk', '3.0')
gi.require_version('Gdk', '3.0') gi.require_version('Gdk', '3.0')
from gi.repository import Gtk from gi.repository import Gtk
from gi.repository import Gdk from gi.repository import Gdk
from gi.repository import GLib from gi.repository import GLib

View File

@ -1,7 +1,7 @@
# Python imports # Python imports
import os import os
import threading import threading
import ime import time
from multiprocessing.connection import Client from multiprocessing.connection import Client
from multiprocessing.connection import Listener from multiprocessing.connection import Listener

View File

@ -1,7 +1,7 @@
# Python imports # Python imports
import re import re
# Gtk imports # Lib imports
import gi import gi
gi.require_version('Gdk', '3.0') gi.require_version('Gdk', '3.0')
from gi.repository import Gdk from gi.repository import Gdk
@ -10,6 +10,7 @@ from gi.repository import Gdk
def err(log = ""): def err(log = ""):
"""Print an error message""" """Print an error message"""
print(log) print(log)

View File

@ -2,9 +2,13 @@
import os import os
import logging import logging
# Lib imports
# Application imports # Application imports
class Logger: class Logger:
""" """
Create a new logging object and return it. Create a new logging object and return it.

View File

@ -3,7 +3,7 @@ import os
import json import json
import inspect import inspect
# Gtk imports # Lib imports
# Application imports # Application imports
from .logger import Logger from .logger import Logger