Update type annotations to ensure Sydent typechecks with recent mypy versions.