Add type hints to urllib3.util.util
MODIFY
noxfile.py
noxfile.py
@@ -22,6 +22,7 @@ TYPED_FILES = {
"src/urllib3/util/ssl_match_hostname.py",
"src/urllib3/util/ssltransport.py",
"src/urllib3/util/url.py",
+ "src/urllib3/util/util.py",
"src/urllib3/util/wait.py",
}
SOURCE_FILES = [

MODIFY
src/urllib3/util/util.py
src/urllib3/util/util.py
@@ -28,7 +28,7 @@ def to_str(
def reraise(
tp: Optional[Type[BaseException]],
- value: Optional[BaseException],
+ value: BaseException,
tb: Optional[TracebackType] = None,
) -> NoReturn:
try:
@@ -36,5 +36,5 @@ def reraise(
raise value.with_traceback(tb)
raise value
finally:
- value = None
+ value = None # type: ignore
tb = None

Add type hints to urllib3.util.util