Athanasius
0f83e5b035
macos config: Respect suppress
argument to config.delete()
...
Else the blind deletion of the shipyard key at startup causes a fatal
exception.
2021-04-01 14:45:50 +01:00
Athanasius
e777727658
Change JournalLock.obtain_lock() return to an Enum.
...
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
2021-04-01 14:45:50 +01:00
A_D
60dd93a3de
Fixed invalid type annotation
2021-04-01 14:45:50 +01:00
A_D
e4c0703142
fixed log wording
2021-04-01 14:45:50 +01:00
A_D
ee4451560a
added regression test
2021-04-01 14:45:50 +01:00
A_D
f5575e5b8e
Fixed broken suppress_call calls
2021-04-01 14:45:50 +01:00
A_D
7707c26d18
tiny mypy cleanup
2021-04-01 14:45:50 +01:00
A_D
45e14ee86c
added stacktrace to debug log
2021-04-01 14:45:50 +01:00
Athanasius
ba91aa4733
Two final s/getint/get_int/g instances.
...
Tested with firing up under debugger, switching to transparent theme,
repeatedly mousing in and out, switching back to Dark theme.
2021-04-01 14:45:50 +01:00
Athanasius
84afe6821a
import of watchdog.events.FileCreatedEvent needed even when not type checking
...
PyCharm debugging bailed out due to the lack.
2021-04-01 14:45:50 +01:00
Athanasius
eef4acd30b
Document line
param to parse_entry()
2021-04-01 14:45:50 +01:00
Athanasius
3997dbab3a
update pre-commit
2021-04-01 14:45:50 +01:00
Athanasius
4a1feb4d49
Type hints should be 100% now.
...
There's something around line 324:
entry: OrderedDictT[str, Any] = OrderedDict([
producing an error with pre-commit's run of mypy
2021-04-01 14:45:50 +01:00
Athanasius
20772e7daf
Fixed current mypy complaints.
...
There are still *missing* type annotations.
2021-04-01 14:45:50 +01:00
Athanasius
1c82605d9f
monitor.py: General cleanup work on flake8 output.
...
* 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.
2021-04-01 14:45:50 +01:00
Athanasius
3fddd2bdf9
try/except ModulesInfo.json load & fully document
2021-04-01 14:45:50 +01:00
Athanasius
fd0ce63341
Add basic support for ModuleInfo event.
...
This still needs documentation adding in PLUGINS.md, which is easiest
done after #897 is merged and re-based upon.
2021-04-01 14:45:50 +01:00
Athanasius
361cd168af
Actually show exception on json.load(<NavRoute.json>) exception
2021-04-01 14:45:50 +01:00
Athanasius
f280a7e863
try/except for NavRoute json.load()
2021-04-01 14:45:50 +01:00
Athanasius
0dc7c62fa8
Correct Route
to NavRoute
in the code/comments as well
2021-04-01 14:45:50 +01:00
Athanasius
1ee2be8fc8
Call out discrepancies between Journal doc v28 and reality in 3.7.x
2021-04-01 14:45:50 +01:00
Athanasius
b3a1b0492e
Correct event and file name to NavRoute(.json) & expand docs
...
* 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.
2021-04-01 14:45:50 +01:00
Athanasius
ef891fa8bd
Initial support for Route.json file
2021-04-01 14:45:50 +01:00
A_D
e293f0f334
Removed star import
2021-04-01 14:45:50 +01:00
A_D
82db2e1a06
Removed star import from ctypes
2021-04-01 14:45:50 +01:00
Athanasius
933ec723bd
plugins/eddn: Call requests.Session.close() in EDDN.close()
...
Avoids a `-W default` warning on shutdown.
2021-04-01 14:45:50 +01:00
Athanasius
6aa4ccaf90
plugins/edsm: Don't try to r.close(), that's not even valid
2021-04-01 14:45:50 +01:00
Athanasius
3d3674da5f
plugins/edsm: Call requests.Session.close() after we've shutdown worker thread
...
This properly closes any sockets and avoids a -W default warning on
shutdown.
2021-04-01 14:45:50 +01:00
Athanasius
d7d3dc19e4
companion.py: Add Auth destructor to close session.
...
It's created in the constructor, so destructor is the place for this.
2021-04-01 14:45:50 +01:00
Athanasius
745c2ce8d2
edsm: Ensure Request handles are closed.
2021-04-01 14:45:50 +01:00
Athanasius
96953744c9
monitor: Close journal loghandle if signalled to close down.
2021-04-01 14:45:50 +01:00
Athanasius
f2ce63bfe7
l10n: Close localisation files after reading content
...
* These are opened in self.file() using codecs.open(), so no quick way
to convert to a 'with'.
2021-04-01 14:45:50 +01:00
Athanasius
114379c8ed
hotkey: Load good/bad sounds without leaking an open file descriptor.
2021-04-01 14:45:50 +01:00
Athanasius
a6866fb4d1
EDMCLogging: Return 'best efforts' if erroring in caller_attributes()
2021-04-01 14:45:50 +01:00
Athanasius
d589ca6ed2
Expand caller_attributes() docstring to params and return
2021-04-01 14:45:50 +01:00
Athanasius
81e25adfb1
Bump version to 5.0.0-beta1, due to removal of {stations,systems}.p files
2021-04-01 14:45:50 +01:00
Athanasius
357f2278b2
Remove last references to, and generation of, systems.p file
...
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
2021-04-01 14:45:50 +01:00
Athanasius
09730adbe6
Remove last references to, and generation of, stations.p file.
...
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.
2021-04-01 14:45:50 +01:00
Athanasius
180d5b0cb6
Bump Python 3.8 -> 3.9 in {pr,push}-checks.yml GH workflows
...
Closes #893
2021-04-01 14:45:50 +01:00
Athanasius
4255a2fd28
monitor: Fix isort complains
...
* Tested with py2exe build on Windows 10 native. Frontier auth works.
2021-04-01 14:45:50 +01:00
Athanasius
1504f25d8f
protocol: Expand slightly on WNDCLASS with some references.
2021-04-01 14:45:49 +01:00
Athanasius
1692cac51c
protocol: docstring WNDCLASS structure
...
* Built with py2exe.
* Frontier Auth from scratch works on Windows 10 native.
2021-04-01 14:45:49 +01:00
Athanasius
165f55bba4
protocol: Work around incompatible types using conditional on wine_get_version
2021-04-01 14:45:49 +01:00
Athanasius
9a82874c7e
journal_lock: Now fully type-hinted.
2021-04-01 14:45:49 +01:00
Athanasius
6be73dc50e
journal_lock: Fix import order & add/expand docstrings
2021-04-01 14:45:49 +01:00
Athanasius
d39c0521da
Move JournalLock class into its own file
...
Closes #891
# Conflicts:
# journal_lock.py
# monitor.py
2021-04-01 14:45:49 +01:00
A_D
ceb2f74855
Final type annotation pass
2021-04-01 14:45:49 +01:00
A_D
adba94efa2
re-added appname import from constants
2021-04-01 14:45:49 +01:00
A_D
660878dcff
removed object
2021-04-01 14:45:49 +01:00
A_D
a55e43c0b5
Made linters happy
2021-04-01 14:45:49 +01:00