This module was written before we started using type annotations, so most methods do not have them; instead they (usually) mention types in their docstrings.
We should make all types (but db and cur, as usually) explicit in the signatures.
swh.scheduler.backend will need to be updated accordingly.