Relatively simple. Because all of our loggers are created out of
EDMCLogging, we can create a fake type in EDMCLogging that inherits
from logging.Logger but also defines a trace method.
Once that is done, we just have to annotate our methods to get loggers
with the new type, cast all of the returns, and suddenly we no longer
have any complaints about logger.trace. This doesn't _actually_ change
any behaviour at runtime, and logging.Logger.trace and logging.TRACE
will continue to be broken, but those are used far less than
logger.trace is used throughout the codebase, and therefore I think we
can live with `# type: ignore` comments everywhere
I failed to realise the values I'd moved earlier in the conditional were
being passed by reference to the ctypes call. Thus they had initial
values only upon test, rather than the 'returned' values as they should.
This caused no values to be loaded from the Registry!
* u-prefix is un-necessary, remove it.
* We should get ValueError in some cases, so catch it first.
* Change debug log for if linux config file not yet present.
And added `# type: ignore` comments.
This is a mess. On the tkinter side it *is* an int, default 0. But
enough python stuff has assumed it's a bool for typeshed to define that
tearoff should be. It doesn't match, mypy complains.
* retry_for_shipyard() was only called by itself (for further retry),
and tried to call self.eddn.export_shipyard() which doesn't even
exist.
I suspect this has been unused code since the EDDN code was extracted
out into an internal plugin.
* self.drag_offset given proper typing.
* All functions have at least some typing now. Left the 'event' Tk
arguments bare as mypy seems to infer without complaint.
* Ignore Tkinter 'name' complaints. I've opened
<https://github.com/python/typeshed/issues/4658> to get this
fixed in typeshed.
* If checking `import update` so it's available.
* Don't annotate journal_event 'event' arg, as it's passed through Tk
events mechanism, so let mypy infer it.
* I didn't go looking for darwin 'py2app' docs to find the possible
return types of py2app.recipes['member']['check'], so 'Any' will have
to do.
* re.search may return None, which then doesn't have .group(), so mypy
complains. Just tell it to ignore that code.