mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-15 00:30:33 +03:00
PLUGINS.md: Fix example return type hint for journal_entry()
It's `Optional[str]` for possible error string being returned.
This commit is contained in:
parent
86e148ddb0
commit
fa834daaca
@ -562,7 +562,7 @@ for an example of these techniques.
|
|||||||
```python
|
```python
|
||||||
def journal_entry(
|
def journal_entry(
|
||||||
cmdr: str, is_beta: bool, system: str, station: str, entry: Dict[str, Any], state: Dict[str, Any]
|
cmdr: str, is_beta: bool, system: str, station: str, entry: Dict[str, Any], state: Dict[str, Any]
|
||||||
) -> None:
|
) -> Optional[str]:
|
||||||
if entry['event'] == 'FSDJump':
|
if entry['event'] == 'FSDJump':
|
||||||
# We arrived at a new system!
|
# We arrived at a new system!
|
||||||
if 'StarPos' in entry:
|
if 'StarPos' in entry:
|
||||||
@ -779,7 +779,7 @@ Examples of this are:
|
|||||||
### Journal entry in CQC
|
### Journal entry in CQC
|
||||||
New in version 5.2.0
|
New in version 5.2.0
|
||||||
```python
|
```python
|
||||||
def journal_entry_cqc(cmdr: str, is_beta: bool, entry: Dict[str, Any], state: Dict[str, Any]) -> None:
|
def journal_entry_cqc(cmdr: str, is_beta: bool, entry: Dict[str, Any], state: Dict[str, Any]) -> Optional[str]:
|
||||||
if entry['event'] == 'Location':
|
if entry['event'] == 'Location':
|
||||||
# We loaded to CQC match, lets detect map!
|
# We loaded to CQC match, lets detect map!
|
||||||
cqc_maps = { # dict to map systems names to CQC maps, ref: https://forums.frontier.co.uk/threads/cqc-systems.234394/
|
cqc_maps = { # dict to map systems names to CQC maps, ref: https://forums.frontier.co.uk/threads/cqc-systems.234394/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user