Instead, warn the user with a popup dialog, and reset settings to
default.
Every few months, a user would report corrscope failing to open
due to a corrupted prefs.yaml.
This commit should stop all occurrences of that from now on.
The next commit will help ensure that we never save corrupted files
in the first place.
Not sure if this is a good idea worth keeping.
It may or may not fix a bug I've seen months ago.
In return, it introduces complexity and brittleness into my code,
and could stop working in a future ruamel.yaml update.
Also `pip install` doesn't pin the exact ruamel.yaml version
(accepting higher versions that could break my code),
only `poetry install` pins an exact version.
I also fixed pre-commit hooks on machines without Python 3.6 installed.
I don't like how Black now removes leading and trailing spaces in
doc comments, but it is what it is.
The previously pinned NumPy 1.16.4 was very old
and didn't come with a prebuilt binary wheel for Python 3.8+.
As a result, trying to install corrscope on Python 3.8+ with the pinned
dependency versions (through `poetry install`, not through
`pip install corrscope`) tries (and fails) to build NumPy from scratch.
This updates the pinned NumPy (but not other dependencies) to 1.19.5,
which has prebuilt wheels up to Python 3.9 (the current latest release).
I'm not sure why Poetry wouldn't upgrade to NumPy 1.20.
Previously we linked to shared-dll ffmpeg builds.
When downloading the shared builds, some users fail to extract the DLLs,
causing ffmpeg to not work.
Static has a larger filesize, but is less likely to confuse users.
Previously, we linked to the latest ffmpeg dev build.
I'm unsure if ffmpeg dev builds are unstable
or may have bugs varying from version to version.
And there is no URL on zeranoe's website to get the latest release build.
So instead hard-code/pin the current latest release,
and update it from time to time.
I used to delete matplotlib bundled fonts. If matplotlib can't find dejavu sans, it overflows the stack and raises an exception (on my machine) or crashes (on others' machines).
This PR re-bundles the fonts. Increases uncompressed size by ~8MB and compressed size by 2.5MB, but worth it.