I think https://github.com/python/typeshed/blob/61d876e4ea62c42599dbaa59471576d6eda0e04d/stdlib/typing.pyi#L480 is buggy. It needs an overload for the case where the second argument is not specified.
Originally posted by @JelleZijlstra in #1033 (reply in thread)
(Edit by Akuli: link to a specific commit instead of master)