wip: Fix mypy issues which fail the master build
As per [1]
- [1] https://jenkins.softwareheritage.org/view/swh%20master%20(draft)/job/DWAPPS/job/tests/3135/console
Related to #4280 (closed)
Test Plan
did not check tox, let's see what jenkins say
Migrated from D7895 (view on Phabricator)