1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-14 08:17:13 +03:00

plugins/eddb: Fix journal_entry() and new_data types

plug.py does `dict(entry)` before calling a plugin's `journal_entry()`, so
`dict` is correct for `data`.  Thus also use that for `new_data`'s type.
This commit is contained in:
Athanasius 2022-12-30 16:34:17 +00:00
parent 0fe5e17b65
commit 3f91e57c7c
No known key found for this signature in database
GPG Key ID: 772697E181BB2767

View File

@ -42,7 +42,7 @@
# ! $# ! $# ! $# ! $# ! $# ! $# ! $# ! $# ! $# ! $# ! $# ! $# ! $# ! $# ! $#
# ! $# ! $# ! $# ! $# ! $# ! $# ! $# ! $# ! $# ! $# ! $# ! $# ! $# ! $# ! $#
import tkinter
from typing import TYPE_CHECKING, Any, Dict, Mapping, MutableMapping, Optional
from typing import TYPE_CHECKING, Any, Mapping, Optional
import requests
@ -154,7 +154,7 @@ def prefs_changed(cmdr: str, is_beta: bool) -> None:
def journal_entry( # noqa: CCR001
cmdr: str, is_beta: bool, system: str, station: str,
entry: MutableMapping[str, Any],
entry: dict[str, Any],
state: Mapping[str, Any]
):
"""
@ -169,7 +169,7 @@ def journal_entry( # noqa: CCR001
:return: None if no error, else an error string.
"""
should_return: bool
new_entry: Dict[str, Any] = {}
new_entry: dict[str, Any] = {}
should_return, new_entry = killswitch.check_killswitch('plugins.eddb.journal', entry)
if should_return: