Add types to util.reraise()
MODIFY
src/urllib3/util/util.py
src/urllib3/util/util.py
-from typing import Optional, Union
+from types import TracebackType
+from typing import NoReturn, Optional, Type, Union
def to_bytes(
@@ -25,7 +26,11 @@ def to_str(
return x.decode()
-def reraise(tp, value, tb=None):
+def reraise(
+ tp: Optional[Type[BaseException]],
+ value: Optional[BaseException],
+ tb: Optional[TracebackType] = None,
+) -> NoReturn:
try:
if value is None:
value = tp()

Add types to util.reraise()