Add type hints for reviewboard.upgrade.
Review Request #12771 — Created Jan. 6, 2023 and submitted
reviewboard.upgradewas written just before we began introducing type
hints. Given how important these steps are, and in preparation for
upcoming work on this module, this change adds type hints so that we
won't have any bad assumptions on data in our pre-upgrade state
Along with type hints, an
UpgradeStateErrorexception class has been
added. This is raised when we fail to find a key we expect to find.
These apply to both
mypy and pyright were happy.
Tested upgrading a Review Board 4 database to 5, using both