refactor(modules): Clean up imports and centralize utilities- Enhancements:
- Remove redundant gi.repository imports - Move common utilities (GLib, GObject, logger, os) into fabric.utils - Centralize GLib usage and reduce namespace pollution
This commit is contained in:
12 files changed
+25
-41
No files matched your search
@@ -5,7 +5,8 @@ import time
|
||||
from pathlib import Path
|
||||
from typing import Dict, List, Optional
|
||||
|
||||
from fabric.utils import get_relative_path
|
||||
from fabric.utils import GLib, get_relative_path
|
||||
|
||||
from modules.launcher.plugin_base import PluginBase
|
||||
from modules.launcher.result import Result
|
||||
from services.auth import (
|
||||
@@ -99,8 +100,6 @@ class OTPPlugin(PluginBase):
|
||||
try:
|
||||
import gc
|
||||
|
||||
from gi.repository import GLib
|
||||
|
||||
def do_update():
|
||||
try:
|
||||
for obj in gc.get_objects():
|
||||
@@ -230,8 +229,6 @@ class OTPPlugin(PluginBase):
|
||||
def _trigger_refresh(self):
|
||||
"""Trigger launcher refresh to return to default OTP view."""
|
||||
try:
|
||||
from gi.repository import GLib
|
||||
|
||||
# Use a small delay to ensure the action completes first
|
||||
def trigger_refresh():
|
||||
try:
|
||||
|
||||
Reference in new issue
Block a user