Show More
@@ -15,7 +15,6 from .node import ( | |||||
15 | ) |
|
15 | ) | |
16 |
|
16 | |||
17 | from typing import ( |
|
17 | from typing import ( | |
18 | Any, |
|
|||
19 | Callable, |
|
18 | Callable, | |
20 | Dict, |
|
19 | Dict, | |
21 | Iterable, |
|
20 | Iterable, | |
@@ -40,19 +39,6 from .utils import ( | |||||
40 | stringutil, |
|
39 | stringutil, | |
41 | ) |
|
40 | ) | |
42 |
|
41 | |||
43 | # keeps pyflakes happy |
|
|||
44 | assert [ |
|
|||
45 | Any, |
|
|||
46 | Callable, |
|
|||
47 | Dict, |
|
|||
48 | Iterable, |
|
|||
49 | List, |
|
|||
50 | Optional, |
|
|||
51 | Set, |
|
|||
52 | Tuple, |
|
|||
53 | Union, |
|
|||
54 | ] |
|
|||
55 |
|
||||
56 | if TYPE_CHECKING: |
|
42 | if TYPE_CHECKING: | |
57 | from . import localrepo |
|
43 | from . import localrepo | |
58 |
|
44 |
@@ -15,11 +15,8 import unicodedata | |||||
15 | from typing import ( |
|
15 | from typing import ( | |
16 | Any, |
|
16 | Any, | |
17 | Callable, |
|
17 | Callable, | |
18 | List, |
|
|||
19 | Text, |
|
18 | Text, | |
20 | Type, |
|
|||
21 | TypeVar, |
|
19 | TypeVar, | |
22 | Union, |
|
|||
23 | ) |
|
20 | ) | |
24 |
|
21 | |||
25 | from . import ( |
|
22 | from . import ( | |
@@ -30,10 +27,6 from . import ( | |||||
30 |
|
27 | |||
31 | from .pure import charencode as charencodepure |
|
28 | from .pure import charencode as charencodepure | |
32 |
|
29 | |||
33 | # keep pyflakes happy |
|
|||
34 | for t in (Any, Callable, List, Text, Type, Union): |
|
|||
35 | assert t |
|
|||
36 |
|
||||
37 | _Tlocalstr = TypeVar('_Tlocalstr', bound='localstr') |
|
30 | _Tlocalstr = TypeVar('_Tlocalstr', bound='localstr') | |
38 |
|
31 | |||
39 | charencode = policy.importmod('charencode') |
|
32 | charencode = policy.importmod('charencode') |
@@ -15,7 +15,6 imports. | |||||
15 | import difflib |
|
15 | import difflib | |
16 |
|
16 | |||
17 | from typing import ( |
|
17 | from typing import ( | |
18 | Any, |
|
|||
19 | AnyStr, |
|
18 | AnyStr, | |
20 | Iterable, |
|
19 | Iterable, | |
21 | List, |
|
20 | List, | |
@@ -28,18 +27,6 from typing import ( | |||||
28 | from . import pycompat |
|
27 | from . import pycompat | |
29 |
|
28 | |||
30 |
|
29 | |||
31 | # keeps pyflakes happy |
|
|||
32 | assert [ |
|
|||
33 | Any, |
|
|||
34 | AnyStr, |
|
|||
35 | Iterable, |
|
|||
36 | List, |
|
|||
37 | Optional, |
|
|||
38 | Sequence, |
|
|||
39 | Union, |
|
|||
40 | ] |
|
|||
41 |
|
||||
42 |
|
||||
43 | def _tobytes(exc) -> bytes: |
|
30 | def _tobytes(exc) -> bytes: | |
44 | """Byte-stringify exception in the same way as BaseException_str()""" |
|
31 | """Byte-stringify exception in the same way as BaseException_str()""" | |
45 | if not exc.args: |
|
32 | if not exc.args: |
@@ -12,7 +12,6 import os | |||||
12 | import sys |
|
12 | import sys | |
13 |
|
13 | |||
14 | from typing import ( |
|
14 | from typing import ( | |
15 | Callable, |
|
|||
16 | List, |
|
15 | List, | |
17 | ) |
|
16 | ) | |
18 |
|
17 | |||
@@ -22,12 +21,6 from . import ( | |||||
22 | pycompat, |
|
21 | pycompat, | |
23 | ) |
|
22 | ) | |
24 |
|
23 | |||
25 | # keeps pyflakes happy |
|
|||
26 | assert [ |
|
|||
27 | Callable, |
|
|||
28 | List, |
|
|||
29 | ] |
|
|||
30 |
|
||||
31 | # modelled after templater.templatepath: |
|
24 | # modelled after templater.templatepath: | |
32 | if getattr(sys, 'frozen', None) is not None: |
|
25 | if getattr(sys, 'frozen', None) is not None: | |
33 | module = pycompat.sysexecutable |
|
26 | module = pycompat.sysexecutable |
@@ -48,20 +48,6 from .utils import ( | |||||
48 | stringutil, |
|
48 | stringutil, | |
49 | ) |
|
49 | ) | |
50 |
|
50 | |||
51 | # keeps pyflakes happy |
|
|||
52 | assert [ |
|
|||
53 | Any, |
|
|||
54 | Callable, |
|
|||
55 | Dict, |
|
|||
56 | Optional, |
|
|||
57 | Sequence, |
|
|||
58 | Tuple, |
|
|||
59 | ] |
|
|||
60 |
|
||||
61 | # keep pyflakes happy |
|
|||
62 | for t in (Any, Callable, Dict, Optional, Tuple): |
|
|||
63 | assert t |
|
|||
64 |
|
||||
65 |
|
51 | |||
66 | def getlimit(opts): |
|
52 | def getlimit(opts): | |
67 | """get the log limit according to option -l/--limit""" |
|
53 | """get the log limit according to option -l/--limit""" |
@@ -44,15 +44,6 from .utils import ( | |||||
44 | ) |
|
44 | ) | |
45 |
|
45 | |||
46 |
|
46 | |||
47 | # keep pyflakes happy |
|
|||
48 | assert [ |
|
|||
49 | Any, |
|
|||
50 | List, |
|
|||
51 | Tuple, |
|
|||
52 | Union, |
|
|||
53 | ] |
|
|||
54 |
|
||||
55 |
|
||||
56 | class STARTTLS(smtplib.SMTP): |
|
47 | class STARTTLS(smtplib.SMTP): | |
57 | """Derived class to verify the peer certificate for STARTTLS. |
|
48 | """Derived class to verify the peer certificate for STARTTLS. | |
58 |
|
49 |
@@ -23,14 +23,6 from . import ( | |||||
23 | rustdirs = policy.importrust('dirstate', 'Dirs') |
|
23 | rustdirs = policy.importrust('dirstate', 'Dirs') | |
24 | parsers = policy.importmod('parsers') |
|
24 | parsers = policy.importmod('parsers') | |
25 |
|
25 | |||
26 | # keeps pyflakes happy |
|
|||
27 | assert [ |
|
|||
28 | Any, |
|
|||
29 | Callable, |
|
|||
30 | Iterator, |
|
|||
31 | Optional, |
|
|||
32 | ] |
|
|||
33 |
|
||||
34 |
|
26 | |||
35 | def _lowerclean(s: bytes) -> bytes: |
|
27 | def _lowerclean(s: bytes) -> bytes: | |
36 | return encoding.hfsignoreclean(s.lower()) |
|
28 | return encoding.hfsignoreclean(s.lower()) |
@@ -132,18 +132,6 from . import ( | |||||
132 | util, |
|
132 | util, | |
133 | ) |
|
133 | ) | |
134 |
|
134 | |||
135 | # keeps pyflakes happy |
|
|||
136 | assert [ |
|
|||
137 | Any, |
|
|||
138 | Callable, |
|
|||
139 | Dict, |
|
|||
140 | Iterable, |
|
|||
141 | List, |
|
|||
142 | Optional, |
|
|||
143 | Set, |
|
|||
144 | Tuple, |
|
|||
145 | ] |
|
|||
146 |
|
||||
147 | Phaseroots = Dict[int, Set[bytes]] |
|
135 | Phaseroots = Dict[int, Set[bytes]] | |
148 |
|
136 | |||
149 | if typing.TYPE_CHECKING: |
|
137 | if typing.TYPE_CHECKING: |
General Comments 0
You need to be logged in to leave comments.
Login now