Issue #2090509 follow-up by yched, andypost: Fix some type-hinting.