Open
Description
Example code code.py
:
import urllib.error
raise urllib.error.HTTPError("https://example.com/", 502, "Bad Gateway", hdrs={}, fp=None)
mypy complains:
code.py:2: error: Argument "hdrs" to "HTTPError" has incompatible type "Dict[<nothing>, <nothing>]"; expected "Message" [arg-type]
Looking at the Python stdlib code, hdrs
is always a dict[str, str]
.