From 4255a2fd283fe279b637aed6f2aff3950056466e Mon Sep 17 00:00:00 2001 From: Athanasius Date: Mon, 8 Mar 2021 17:57:49 +0000 Subject: [PATCH] monitor: Fix isort complains * Tested with py2exe build on Windows 10 native. Frontier auth works. --- monitor.py | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/monitor.py b/monitor.py index abeae8de..e9af7328 100644 --- a/monitor.py +++ b/monitor.py @@ -1,19 +1,21 @@ -from collections import defaultdict, OrderedDict import json import re import threading -from os import listdir, SEEK_SET, SEEK_END +from calendar import timegm +from collections import OrderedDict, defaultdict +from os import SEEK_END, SEEK_SET, listdir from os.path import basename, expanduser, isdir, join from sys import platform from time import gmtime, localtime, sleep, strftime, strptime, time -from calendar import timegm -from typing import Any, List, MutableMapping, Optional, OrderedDict as OrderedDictT, Tuple, TYPE_CHECKING, Union +from typing import TYPE_CHECKING, Any, List, MutableMapping, Optional +from typing import OrderedDict as OrderedDictT +from typing import Tuple, Union if TYPE_CHECKING: import tkinter -from config import config from companion import ship_file_name +from config import config from EDMCLogging import get_main_logger logger = get_main_logger() @@ -23,18 +25,20 @@ if TYPE_CHECKING: return x if platform == 'darwin': - from AppKit import NSWorkspace - from watchdog.observers import Observer - from watchdog.events import FileSystemEventHandler from fcntl import fcntl + + from AppKit import NSWorkspace + from watchdog.events import FileSystemEventHandler + from watchdog.observers import Observer F_GLOBAL_NOCACHE = 55 elif platform == 'win32': - from watchdog.observers import Observer - from watchdog.events import FileSystemEventHandler import ctypes from ctypes.wintypes import BOOL, HWND, LPARAM, LPWSTR + from watchdog.events import FileSystemEventHandler + from watchdog.observers import Observer + EnumWindows = ctypes.windll.user32.EnumWindows EnumWindowsProc = ctypes.WINFUNCTYPE(BOOL, HWND, LPARAM)