mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-06-07 10:53:26 +03:00
added type hints to literals
This commit is contained in:
parent
9005798862
commit
67a260c07f
@ -42,18 +42,18 @@ this.lastship = None # eventData from the last addCommanderShip or setCommander
|
|||||||
this.events: List[OrderedDictT[str, Any]] = [] # Unsent events
|
this.events: List[OrderedDictT[str, Any]] = [] # Unsent events
|
||||||
this.cmdr: Optional[str] = None
|
this.cmdr: Optional[str] = None
|
||||||
this.FID: Optional[str] = None # Frontier ID
|
this.FID: Optional[str] = None # Frontier ID
|
||||||
this.multicrew = False # don't send captain's ship info to Inara while on a crew
|
this.multicrew: bool = False # don't send captain's ship info to Inara while on a crew
|
||||||
this.newuser = False # just entered API Key - send state immediately
|
this.newuser: bool = False # just entered API Key - send state immediately
|
||||||
this.newsession = True # starting a new session - wait for Cargo event
|
this.newsession: bool = True # starting a new session - wait for Cargo event
|
||||||
this.undocked = False # just undocked
|
this.undocked: bool = False # just undocked
|
||||||
this.suppress_docked = False # Skip initial Docked event if started docked
|
this.suppress_docked = False # Skip initial Docked event if started docked
|
||||||
this.cargo: Optional[OrderedDictT[str, Any]] = None
|
this.cargo: Optional[OrderedDictT[str, Any]] = None
|
||||||
this.materials: Optional[OrderedDictT[str, Any]] = None
|
this.materials: Optional[OrderedDictT[str, Any]] = None
|
||||||
this.lastcredits = 0 # Send credit update soon after Startup / new game
|
this.lastcredits: int = 0 # Send credit update soon after Startup / new game
|
||||||
this.storedmodules: Optional[OrderedDictT[str, Any]] = None
|
this.storedmodules: Optional[OrderedDictT[str, Any]] = None
|
||||||
this.loadout: Optional[OrderedDictT[str, Any]] = None
|
this.loadout: Optional[OrderedDictT[str, Any]] = None
|
||||||
this.fleet: Optional[List[OrderedDictT[str, Any]]] = None
|
this.fleet: Optional[List[OrderedDictT[str, Any]]] = None
|
||||||
this.shipswap = False # just swapped ship
|
this.shipswap: bool = False # just swapped ship
|
||||||
|
|
||||||
# last time we updated, if unset in config this is 0, which means an instant update
|
# last time we updated, if unset in config this is 0, which means an instant update
|
||||||
LAST_UPDATE_CONF_KEY = 'inara_last_update'
|
LAST_UPDATE_CONF_KEY = 'inara_last_update'
|
||||||
@ -1090,7 +1090,7 @@ def add_event(name: str, timestamp: str, data: Mapping[str, Any]):
|
|||||||
]))
|
]))
|
||||||
|
|
||||||
|
|
||||||
def call_timer(wait=FLOOD_LIMIT_SECONDS):
|
def call_timer(wait: int = FLOOD_LIMIT_SECONDS):
|
||||||
"""
|
"""
|
||||||
call_timer runs in its own thread polling out to INARA once every FLOOD_LIMIT_SECONDS
|
call_timer runs in its own thread polling out to INARA once every FLOOD_LIMIT_SECONDS
|
||||||
|
|
||||||
@ -1101,8 +1101,6 @@ def call_timer(wait=FLOOD_LIMIT_SECONDS):
|
|||||||
if this.timer_run: # check again in here just in case we're closing and the stars align
|
if this.timer_run: # check again in here just in case we're closing and the stars align
|
||||||
call()
|
call()
|
||||||
|
|
||||||
# Queue a call to Inara, handled in Worker thread
|
|
||||||
|
|
||||||
|
|
||||||
def call(callback=None, force=False):
|
def call(callback=None, force=False):
|
||||||
"""
|
"""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user