equal
deleted
inserted
replaced
8 |
8 |
9 import calendar |
9 import calendar |
10 import datetime |
10 import datetime |
11 import time |
11 import time |
12 |
12 |
|
13 from typing import ( |
|
14 Callable, |
|
15 Dict, |
|
16 Iterable, |
|
17 Optional, |
|
18 Tuple, |
|
19 Union, |
|
20 ) |
|
21 |
13 from ..i18n import _ |
22 from ..i18n import _ |
14 from .. import ( |
23 from .. import ( |
15 encoding, |
24 encoding, |
16 error, |
25 error, |
17 pycompat, |
26 pycompat, |
18 ) |
27 ) |
19 |
28 |
20 if pycompat.TYPE_CHECKING: |
29 # keeps pyflakes happy |
21 from typing import ( |
30 assert [ |
22 Callable, |
31 Callable, |
23 Dict, |
32 Dict, |
24 Iterable, |
33 Iterable, |
25 Optional, |
34 Optional, |
26 Tuple, |
35 Tuple, |
27 Union, |
36 Union, |
28 ) |
37 ] |
29 |
38 |
30 hgdate = Tuple[float, int] # (unixtime, offset) |
39 hgdate = Tuple[float, int] # (unixtime, offset) |
31 |
40 |
32 # used by parsedate |
41 # used by parsedate |
33 defaultdateformats = ( |
42 defaultdateformats = ( |
34 b'%Y-%m-%dT%H:%M:%S', # the 'real' ISO8601 |
43 b'%Y-%m-%dT%H:%M:%S', # the 'real' ISO8601 |
35 b'%Y-%m-%dT%H:%M', # without seconds |
44 b'%Y-%m-%dT%H:%M', # without seconds |