From 82db2e1a061c39275acca1da16f3996e5df14ac7 Mon Sep 17 00:00:00 2001
From: A_D <aunderscored@gmail.com>
Date: Tue, 9 Mar 2021 18:19:57 +0200
Subject: [PATCH] Removed star import from ctypes

---
 theme.py | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/theme.py b/theme.py
index 26cff4f3..d05a52e6 100644
--- a/theme.py
+++ b/theme.py
@@ -6,26 +6,25 @@
 #
 
 import os
-from sys import platform
-from os.path import join
-
 import tkinter as tk
-from tkinter import ttk
+from os.path import join
+from sys import platform
 from tkinter import font as tkFont
-from ttkHyperlinkLabel import HyperlinkLabel
+from tkinter import ttk
 
-from config import appname, applongname, config
+from config import applongname, appname, config
+from ttkHyperlinkLabel import HyperlinkLabel
 
 if __debug__:
     from traceback import print_exc
 
 if platform == "linux":
-    from ctypes import *
+    from ctypes import POINTER, c_char_p, c_int, c_long, c_uint, c_ulong, c_void_p, cdll, Structure, byref
 
 
 if platform == 'win32':
     import ctypes
-    from ctypes.wintypes import LPCWSTR, DWORD, LPCVOID
+    from ctypes.wintypes import DWORD, LPCVOID, LPCWSTR
     AddFontResourceEx = ctypes.windll.gdi32.AddFontResourceExW
     AddFontResourceEx.restypes = [LPCWSTR, DWORD, LPCVOID]
     FR_PRIVATE  = 0x10
@@ -33,10 +32,11 @@ if platform == 'win32':
     AddFontResourceEx(join(config.respath, u'EUROCAPS.TTF'), FR_PRIVATE, 0)
 
 elif platform == 'linux':
+    # pyright: reportUnboundVariable=false
     XID = c_ulong 	# from X.h: typedef unsigned long XID
     Window = XID
     Atom = c_ulong
-    Display = c_void_p	# Opaque
+    Display = c_void_p  # Opaque
 
     PropModeReplace = 0
     PropModePrepend = 1
@@ -338,7 +338,7 @@ class _Theme(object):
             self.active = theme
 
         if platform == 'darwin':
-            from AppKit import NSApplication, NSAppearance, NSMiniaturizableWindowMask, NSResizableWindowMask
+            from AppKit import NSAppearance, NSApplication, NSMiniaturizableWindowMask, NSResizableWindowMask
             root.update_idletasks()	# need main window to be created
             appearance = NSAppearance.appearanceNamed_(theme and
                                                        'NSAppearanceNameDarkAqua' or