1. `SHGetPathFromIDListW` needing fixing, which was achieved, but...
2. ... then `SHBrowseForFolderW()` as-was returned `int` instead of a pointer
to the correct structure.
Trying to fix 2 has proven intractable:
a. Trying to cast the `int` return just results in `exception: access violation
reading <address>`.
b. Trying to define `SHBrowseForFolderW` properly, so it returns the correct
type results in a *writing* access violation when called, despite passing
the exact same data in as for the 'raw' call version.
So, this commit is a record, and I'm next going to try switching to
`IFileDialog` as recommended by the docs for `SHBrowseForFolderW` ('For
Windows Vista or later').
Given this is the form of definition in the official Python docs I'm
wondering if this only ever worked on 32-bit by accident.
So, it was nothing to do with the type needing to be changed for 64-bit.
The error:
ctypes.ArgumentError: argument 4: <class 'OverflowError'>: int too long to convert
was a red herring in those terms.
We'd been using `skip` because when we started with mypy next to nothing
passed it, and checking one file would spew errors with other files and it
just wasn't conducive to making at least *some* progress.
But now we should have every single file passing, so this is the right thing
to do.
* This finds the pip-installed modules that depend on the specified module.
Handy for cleaning things up.
* Leads to needing types-pkg-resources for mypy (and via pre-commit).
Technically `theme.startup_ui_scale` should be `float` to match with
`default_ui_scale` from tkinter, but we store it in the config as `int`,
so go with that.
Also, the killswitch popup ends up un-themed *anyway*, so don't even call
`theme.apply()`. That function expects a `tk.Tk` not, `Toplevel`, and
doesn't even do anything for a `Toplevel` anyway.
* `logger.INFO` will, at best, be a constant, it should be `logger.info()`.
* When we're not interested in the `new_data` 2nd part of the tuple from
`killswitches.check_killswitch()` we can't use `_` as there's a potential
class with the `l10n.py` injection of `_()` as a builtin.
And you can't declare types withing first-use in a return-tuple. So, declare
them on their own lines, with throwaway default values instead.
* Opening of latest journal file didn't match how done in monitor.py.
This caused `str` instead of `bytes` being passed to `monitor.parse_entry()`.
* It was assuming pre-threaded return of data. Now properly gets it from
the queue.