mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-17 17:42:20 +03:00
Cleaned up imports, removed incase imports
closes EDCD/EDMarketConnector#569
This commit is contained in:
parent
f3b8df6548
commit
fe90f1f0b3
3
EDMC.py
3
EDMC.py
@ -19,9 +19,8 @@ os.environ["EDMC_NO_UI"] = "1"
|
||||
# See EDMCLogging.py docs.
|
||||
# workaround for https://github.com/EDCD/EDMarketConnector/issues/568
|
||||
from EDMCLogging import edmclogger, logger, logging
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from logging import trace, TRACE # type: ignore # noqa: F401
|
||||
from logging import TRACE # type: ignore # noqa: F401 # needed to make mypy happy
|
||||
|
||||
edmclogger.set_channels_loglevel(logging.INFO)
|
||||
|
||||
|
@ -262,8 +262,8 @@ if __name__ == '__main__': # noqa: C901
|
||||
# See EDMCLogging.py docs.
|
||||
# isort: off
|
||||
if TYPE_CHECKING:
|
||||
from logging import trace, TRACE # type: ignore # noqa: F401
|
||||
import update
|
||||
from logging import TRACE # type: ignore # noqa: F401 # Needed to update mypy
|
||||
# import update
|
||||
# from infi.systray import SysTrayIcon
|
||||
# isort: on
|
||||
|
||||
|
@ -19,8 +19,6 @@ import urllib.parse
|
||||
import webbrowser
|
||||
from builtins import object, range, str
|
||||
from email.utils import parsedate
|
||||
# TODO: see https://github.com/EDCD/EDMarketConnector/issues/569
|
||||
from http.cookiejar import LWPCookieJar # noqa: F401 - No longer needed but retained in case plugins use it
|
||||
from os.path import join
|
||||
from typing import TYPE_CHECKING, Any, Dict, List, Mapping, Optional, OrderedDict, TypeVar, Union
|
||||
|
||||
|
16
plug.py
16
plug.py
@ -1,21 +1,18 @@
|
||||
"""
|
||||
Plugin hooks for EDMC - Ian Norton, Jonathan Harris
|
||||
"""
|
||||
from builtins import str
|
||||
from builtins import object
|
||||
import os
|
||||
import importlib
|
||||
import sys
|
||||
import logging
|
||||
import operator
|
||||
import threading # noqa: F401 - We don't use it, but plugins might
|
||||
from typing import Optional
|
||||
import os
|
||||
import sys
|
||||
import tkinter as tk
|
||||
from builtins import object, str
|
||||
from typing import Optional
|
||||
|
||||
import myNotebook as nb # noqa: N813
|
||||
|
||||
from config import appcmdname, appname, config
|
||||
from config import config
|
||||
from EDMCLogging import get_main_logger
|
||||
import logging
|
||||
|
||||
logger = get_main_logger()
|
||||
|
||||
@ -172,6 +169,7 @@ def provides(fn_name):
|
||||
"""
|
||||
return [p.name for p in PLUGINS if p._get_func(fn_name)]
|
||||
|
||||
|
||||
def invoke(plugin_name, fallback, fn_name, *args):
|
||||
"""
|
||||
Invoke a function on a named plugin
|
||||
|
@ -9,19 +9,19 @@
|
||||
# 4) Ensure the EDSM API call(back) for setting the image at end of system
|
||||
# text is always fired. i.e. CAPI cmdr_data() processing.
|
||||
|
||||
from companion import CAPIData
|
||||
import json
|
||||
import sys
|
||||
import tkinter as tk
|
||||
from queue import Queue
|
||||
from threading import Thread
|
||||
from typing import TYPE_CHECKING, Any, List, Mapping, MutableMapping, Optional, Tuple, cast
|
||||
from typing import TYPE_CHECKING, Any, List, Mapping, MutableMapping, Optional, Tuple
|
||||
|
||||
import requests
|
||||
|
||||
import killswitch
|
||||
import myNotebook as nb # noqa: N813
|
||||
import plug
|
||||
from companion import CAPIData
|
||||
from config import applongname, appversion, config
|
||||
from EDMCLogging import get_main_logger
|
||||
from ttkHyperlinkLabel import HyperlinkLabel
|
||||
|
2
setup.py
2
setup.py
@ -191,6 +191,8 @@ elif sys.platform == 'win32':
|
||||
'shutil', # Included for plugins
|
||||
'timeout_session',
|
||||
'zipfile', # Included for plugins
|
||||
'threading', # Included for plugins (though it should always be there anyway)
|
||||
'http', # Included for plugins
|
||||
],
|
||||
'excludes': [
|
||||
'distutils',
|
||||
|
6
td.py
6
td.py
@ -1,13 +1,11 @@
|
||||
# Export to Trade Dangerous
|
||||
|
||||
from os.path import join
|
||||
import time
|
||||
from collections import defaultdict
|
||||
import codecs
|
||||
import numbers
|
||||
from operator import itemgetter
|
||||
from os.path import join
|
||||
from platform import system
|
||||
from sys import platform
|
||||
import time
|
||||
|
||||
from config import applongname, appversion, config
|
||||
|
||||
|
4
theme.py
4
theme.py
@ -12,14 +12,14 @@ from sys import platform
|
||||
from tkinter import font as tkFont
|
||||
from tkinter import ttk
|
||||
|
||||
from config import applongname, appname, config
|
||||
from config import config
|
||||
from ttkHyperlinkLabel import HyperlinkLabel
|
||||
|
||||
if __debug__:
|
||||
from traceback import print_exc
|
||||
|
||||
if platform == "linux":
|
||||
from ctypes import POINTER, c_char_p, c_int, c_long, c_uint, c_ulong, c_void_p, cdll, Structure, byref
|
||||
from ctypes import POINTER, Structure, byref, c_char_p, c_int, c_long, c_uint, c_ulong, c_void_p, cdll
|
||||
|
||||
|
||||
if platform == 'win32':
|
||||
|
Loading…
x
Reference in New Issue
Block a user