Reformat with black
This MR introduces the following changes, which can be better observed by commits rather than by diff as for this MR black implies many changes:
- black reformatting of the repository;
- imports sorting as per PEP8 recommendation;
- edit CI to check
mypy
andflake8
on the whole repository; - Fix residual flake8 and mypy complaints (not related to black).
Edited by Lucas Meyer