Improve type annotations throughout the module
All main module's files were updated with exhaustive type annotations,
making the necessary (minor) fixes for the code to be compliant with it.
Also, __future__. Annotations
was imported to avoid using strings when
possible.
Depends on !59 (closed).
Migrated from D5961 (view on Phabricator)