fix type-hints for 1.2.x compatibility