1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-16 09:10:35 +03:00

plugins/edsm: cmdr & entry declared & set early, so types now OK

This commit is contained in:
Athanasius 2021-08-05 15:23:15 +01:00
parent ddc9286903
commit a794d6088f
No known key found for this signature in database
GPG Key ID: AE3E527847057C7D

View File

@ -609,13 +609,6 @@ def worker() -> None: # noqa: CCR001 C901 # Cant be broken up currently
)
break
try:
if TYPE_CHECKING:
# Tell the type checker that these two are bound.
# TODO: While this works because of the item check below, these names are still technically unbound
# TODO: in some cases, therefore this should be refactored.
cmdr = ""
entry = {}
if item and entry['event'] not in this.discardedEvents: # TODO: Technically entry can be unbound here.
if 'edsm-cmdr-events' in trace_on:
logger.trace(f'({cmdr=}, {entry["event"]=}): not in discardedEvents, appending to pending')