Better typehinting.
fix test
Merge pull request #4348 from dereuromark/3.0-typehint

Better typehinting.