More type fixing. This fixes errors appearing with higher versions of mypy, but not the two errors in the pipeline which I do not understand and don't want to just sidestep with # type: ignore
Checklist
[ ] Wrote Unit tests (if necessary)
[ ] Updated Documentation (if necessary)
[ ] Updated Changelog
[ ] If notebooks were added/changed, added boilerplate cells are tagged with "nbsphinx":"hidden"
Description
More type fixing. This fixes errors appearing with higher versions of mypy, but not the two errors in the pipeline which I do not understand and don't want to just sidestep with
# type: ignore
Checklist
"nbsphinx":"hidden"