Show More
@@ -9,6 +9,9 b' import re as remod' | |||||
9 | import socket |
|
9 | import socket | |
10 |
|
10 | |||
11 | from typing import ( |
|
11 | from typing import ( | |
|
12 | Callable, | |||
|
13 | Dict, | |||
|
14 | Tuple, | |||
12 | Union, |
|
15 | Union, | |
13 | ) |
|
16 | ) | |
14 |
|
17 | |||
@@ -29,7 +32,7 b' from ..revlogutils import (' | |||||
29 | ) |
|
32 | ) | |
30 |
|
33 | |||
31 | # keeps pyflakes happy |
|
34 | # keeps pyflakes happy | |
32 | assert [Union] |
|
35 | assert [Callable, Dict, Tuple, Union] | |
33 |
|
36 | |||
34 | urlreq = urllibcompat.urlreq |
|
37 | urlreq = urllibcompat.urlreq | |
35 |
|
38 | |||
@@ -652,12 +655,12 b' class paths(dict):' | |||||
652 | self[name] = new_paths |
|
655 | self[name] = new_paths | |
653 |
|
656 | |||
654 |
|
657 | |||
655 | _pathsuboptions = {} |
|
658 | _pathsuboptions: "Dict[bytes, Tuple[str, Callable]]" = {} | |
656 | # a dictionnary of methods that can be used to format a sub-option value |
|
659 | # a dictionnary of methods that can be used to format a sub-option value | |
657 | path_suboptions_display = {} |
|
660 | path_suboptions_display = {} | |
658 |
|
661 | |||
659 |
|
662 | |||
660 | def pathsuboption(option, attr, display=pycompat.bytestr): |
|
663 | def pathsuboption(option: bytes, attr: str, display=pycompat.bytestr): | |
661 | """Decorator used to declare a path sub-option. |
|
664 | """Decorator used to declare a path sub-option. | |
662 |
|
665 | |||
663 | Arguments are the sub-option name and the attribute it should set on |
|
666 | Arguments are the sub-option name and the attribute it should set on |
General Comments 0
You need to be logged in to leave comments.
Login now