Fix type hint of UrlGenerator

Sent again to master.