On darwin this comes back with the type `__NSCFArray`, which I can't
find the definition of (in order to test against it). So instead let's
check that `res` is not-None, and not one of `str` or `int`, because
then it should be (meant to be) `list`.
Yes, this is weird given the pre-rewrite code is:
```python
def get(self, key: str) -> Union[None, list, str]:
"""Look up a string configuration value."""
val = self.settings.get(key)
if val is None:
return None
elif isinstance(val, str):
return str(val)
elif isinstance(val, list):
return list(val) # make writeable
else:
return None
```
But maybe something changed since 3.43 was tested and built.
This way we can tell the difference between:
1. This process obtained the lock.
2. Another process has the lock.
3. We couldn't get the lock due to not being able to open the lock file
read-write.
Case 3 is currently also returned if the configured journal directory
doesn't exist. This will be the case on any MacOS system that never had
the game running. Likely given the OS hasn't been supported for the
game in years now.
# Conflicts:
# EDMarketConnector.py
* docstrings added as per flake8 complaints.
* Some type hints added (as I was documenting param and return).
* Also reworked two uses of .format()
* A number of functions had noqa added for cognitive complexity.
* Despite what section 4.18 of v28 Journal docs say, the event is
`NavRoute`, not `Route`, and the file is `NavRoute.json`. The array
of hops is still keyed as `Route` though.
* Calls out that both `NavRoute` and `Cargo` events, as passed to
plugins, are augmented with the data from their respective files, and
are not simply the 'bare' event as seen in the Journal.
This was the last code in eddb.py, so that has now been removed.
This was historically used by the core EDDB plugin to construct a valid
URL for a given station. EDDB has long-since provided alternate URL
formats that negate the need for this.
Plugin authors have been warned not to use this already.
# Conflicts:
# setup.py
This was historically used by the core EDDB plugin to construct a valid
URL for a given station. EDDB has long-since provided alternate URL
formats that negate the need for this.
Plugin authors have been warned not to use this already.