This removes the assertions that checked plugin devs didn't do anything
overly bad in favour of using mypy to ensure appropriate type-checking.
It also moves the ProgressCallback typing information to constants in
order to avoid circular imports (since constants doesn't import
anything).
So that we don't get contributions that include author lines remove any
that exist currently in the code. We need to figure out how we're going
to support attribution, probably through an AUTHORS file, but definitely
not peppering the code.
Relented on the strict import of direct objects/classes for the typing
module only. Typing module components can be directly imported because
it makes the code really painful to read and write otherwise.
This is still in-line with the python style guide adopted from Google at
http://google.github.io/styleguide/pyguide.html section 2.2.
Refactored the location of the progress_callback so that the UI can
specify it and ensure it is used by the automagics process as well as
the plugins themselves.
The progress_callback function has also had an optional description parameter
added, so that it can differentiated in case two scans happen
simultaneously.
- moved segment loading out of __init__(), now happens on first use
- fixed mapping() to return the correct chunk_size
- self._base_layer is a string, not a layer