Import cleanup

This commit is contained in:
itdominator 2023-01-28 23:54:23 -06:00
parent dcaa5ce626
commit 9ae0182928
11 changed files with 35 additions and 29 deletions

View File

@ -1,5 +1,5 @@
# Python imports
import threading, json
import json
from os import path
# Lib imports
@ -8,10 +8,6 @@ from os import path
from .window import Window
def threaded(fn):
def wrapper(*args, **kwargs):
threading.Thread(target=fn, args=args, kwargs=kwargs, daemon=True).start()
return wrapper
class WindowController:

View File

@ -1,4 +1,4 @@
# Python Imports
# Python imports
import hashlib
from os.path import isfile
@ -21,6 +21,7 @@ from .mixins.desktopiconmixin import DesktopIconMixin
class Icon(DesktopIconMixin, VideoIconMixin, MeshsIconMixin):
def create_icon(self, dir, file):
full_path = f"{dir}/{file}"

View File

@ -1,8 +1,10 @@
# Python Imports
import os, subprocess, hashlib
# Python imports
import os
from os.path import isfile
import subprocess
import hashlib
# Gtk imports
# Lib imports
import gi
gi.require_version('Gtk', '3.0')
@ -13,6 +15,8 @@ from gi.repository import Gio
from .xdg.DesktopEntry import DesktopEntry
class DesktopIconMixin:
def parse_desktop_files(self, full_path):
try:

View File

@ -1,4 +1,4 @@
# Python Imports
# Python imports
import subprocess
# Lib imports
@ -6,6 +6,8 @@ import subprocess
# Application imports
class MeshsIconMixin:
def generate_blender_thumbnail(self, full_path, hash_img_path):
try:

View File

@ -1,4 +1,4 @@
# Python Imports
# Python imports
import subprocess
# Lib imports
@ -6,6 +6,8 @@ import subprocess
# Application imports
class VideoIconMixin:
def generate_video_thumbnail(self, full_path, hash_img_path, scrub_percent = "65%"):
try:

View File

@ -6,6 +6,8 @@ import os
# Application imports
class Path:
def get_home(self) -> str:
return os.path.expanduser("~") + self.subpath

View File

@ -1,23 +1,24 @@
# Python imports
import hashlib, re
import hashlib
import re
from os import listdir
from os.path import isdir, isfile, join
from os.path import isdir
from os.path import isfile
from os.path import join
from random import randint
# Lib imports
# Application imports
from .utils.settings import Settings
from .utils.launcher import Launcher
from .utils.filehandler import FileHandler
from .icons.icon import Icon
from .path import Path
class Tab(Settings, FileHandler, Launcher, Icon, Path):
def __init__(self):
self.logger = None

View File

@ -1,5 +1,6 @@
# Python imports
import os, shutil
import os
import shutil
# Lib imports

View File

@ -1,16 +1,13 @@
# System import
import os, threading, subprocess, shlex
# Python imports
import os,
import subprocess
import shlex
# Lib imports
# Apoplication imports
def threaded(fn):
def wrapper(*args, **kwargs):
threading.Thread(target=fn, args=args, kwargs=kwargs).start()
return wrapper
class Launcher:

View File

@ -1,15 +1,15 @@
# System import
# Python imports
import json
import os
from os import path
# Lib imports
# Apoplication imports
class Settings:
logger = None

View File

@ -1,14 +1,14 @@
# Python imports
from random import randint
# Lib imports
# Application imports
from .tabs.tab import Tab
class Window:
def __init__(self):
self._id_length: int = 10