Fix import statements and order (see #103)

This commit is contained in:
coderkun 2024-05-27 18:33:59 +02:00
parent a1f8b73590
commit 4ebfc12f0e
10 changed files with 13 additions and 27 deletions

View file

@ -4,7 +4,6 @@ import gi
gi.require_version('Gtk', '4.0')
gi.require_version('Adw', '1')
from gi.repository import Gtk, GObject, Adw

View file

@ -5,7 +5,7 @@ import gi
gi.require_version('Gtk', '4.0')
gi.require_version('Adw', '1')
from gi.repository import Gio, Gtk, Gdk, GLib, Adw
from gi.repository import Gio, Gtk, Gdk, Adw
from .window import Window

View file

@ -1,13 +1,11 @@
#!/usr/bin/env python3
import gi
import locale
gi.require_version('Gtk', '4.0')
gi.require_version('Adw', '1')
import locale
from gi.repository import Gtk, Gio, GObject, Adw
from gi.repository import Gtk, GObject, Adw
from mcg.zeroconf import ZeroconfProvider

View file

@ -1,11 +1,9 @@
#!/usr/bin/env python3
import gi
gi.require_version('Gtk', '4.0')
import logging
import math
gi.require_version('Gtk', '4.0')
from gi.repository import Gtk, Gdk, GObject, GdkPixbuf
from mcg.utils import Utils

View file

@ -1,14 +1,13 @@
#!/usr/bin/env python3
import gi
gi.require_version('Gtk', '4.0')
gi.require_version('Adw', '1')
import locale
import logging
import math
import threading
gi.require_version('Gtk', '4.0')
gi.require_version('Adw', '1')
from gi.repository import Gtk, Gdk, GObject, GdkPixbuf, Gio, Adw
from mcg import client
from mcg.albumheaderbar import AlbumHeaderbar

View file

@ -1,13 +1,11 @@
#!/usr/bin/env python3
import gi
gi.require_version('Gtk', '4.0')
gi.require_version('Adw', '1')
import logging
import math
import threading
gi.require_version('Gtk', '4.0')
gi.require_version('Adw', '1')
from gi.repository import Gtk, Gdk, Gio, GObject, GdkPixbuf, Adw
from mcg import client
from mcg.albumheaderbar import AlbumHeaderbar

View file

@ -4,7 +4,6 @@ import gi
gi.require_version('Gtk', '4.0')
gi.require_version('Adw', '1')
from gi.repository import Gtk, Adw, GObject

View file

@ -1,13 +1,11 @@
#!/usr/bin/env python3
import gi
gi.require_version('Gtk', '4.0')
import hashlib
import locale
import os
import urllib
gi.require_version('Gtk', '4.0')
from gi.repository import Gdk, GdkPixbuf, GObject, Gtk

View file

@ -1,20 +1,17 @@
#!/usr/bin/env python3
import gi
gi.require_version('Gtk', '4.0')
gi.require_version('Adw', '1')
try:
import keyring
use_keyring = True
except:
except ImportError:
use_keyring = False
use_keyring = False
import locale
import logging
gi.require_version('Gtk', '4.0')
gi.require_version('Adw', '1')
from gi.repository import Gtk, Adw, Gdk, GObject, GLib, Gio
from . import client
from .shortcutsdialog import ShortcutsDialog
from .connectionpanel import ConnectionPanel

View file

@ -5,7 +5,7 @@ try:
gi.require_version('Avahi', '0.6')
from gi.repository import Avahi
use_avahi = True
except:
except ValueError | ImportError:
use_avahi = False
import logging