diff -r 32a1c9226dd9 -r a09435c0eb14 mercurial/utils/urlutil.py --- a/mercurial/utils/urlutil.py Wed Jul 10 15:49:16 2024 -0400 +++ b/mercurial/utils/urlutil.py Wed Jul 10 16:04:53 2024 -0400 @@ -9,6 +9,9 @@ import socket from typing import ( + Callable, + Dict, + Tuple, Union, ) @@ -29,7 +32,7 @@ ) # keeps pyflakes happy -assert [Union] +assert [Callable, Dict, Tuple, Union] urlreq = urllibcompat.urlreq @@ -652,12 +655,12 @@ self[name] = new_paths -_pathsuboptions = {} +_pathsuboptions: "Dict[bytes, Tuple[str, Callable]]" = {} # a dictionnary of methods that can be used to format a sub-option value path_suboptions_display = {} -def pathsuboption(option, attr, display=pycompat.bytestr): +def pathsuboption(option: bytes, attr: str, display=pycompat.bytestr): """Decorator used to declare a path sub-option. Arguments are the sub-option name and the attribute it should set on