1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-18 18:07:37 +03:00

updated type annotation

This commit is contained in:
A_D 2020-07-27 11:26:31 +02:00
parent 7b231fb244
commit cad5f72b0a
No known key found for this signature in database
GPG Key ID: 4BE9EB7DF45076C4

View File

@ -24,11 +24,15 @@
import sys
from typing import Any, Optional
import tkinter
from typing import Any, Optional, TYPE_CHECKING
import requests
from config import config
if TYPE_CHECKING:
from tkinter import Tk
STATION_UNDOCKED: str = '×' # "Station" name to display when not docked = U+00D7
@ -39,7 +43,7 @@ this.system_link: Optional[str] = None
this.system: Optional[str] = None
this.system_address: Optional[str] = None
this.system_population: Optional[int] = None
this.station_link = None # tk thing, not annotated
this.station_link: 'Optional[tkinter.Tk]' = None
this.station: Optional[str] = None
this.station_marketid: Optional[int] = None
@ -67,7 +71,7 @@ def plugin_start3(plugin_dir):
return 'eddb'
def plugin_app(parent):
def plugin_app(parent: 'tkinter.Tk'):
this.system_link = parent.children['system'] # system label in main window
this.system = None
this.system_address = None