equal
deleted
inserted
replaced
9 import gettext as gettextmod |
9 import gettext as gettextmod |
10 import locale |
10 import locale |
11 import os |
11 import os |
12 import sys |
12 import sys |
13 |
13 |
|
14 from typing import ( |
|
15 Callable, |
|
16 List, |
|
17 ) |
|
18 |
14 from .utils import resourceutil |
19 from .utils import resourceutil |
15 from . import ( |
20 from . import ( |
16 encoding, |
21 encoding, |
17 pycompat, |
22 pycompat, |
18 ) |
23 ) |
19 |
24 |
20 if pycompat.TYPE_CHECKING: |
25 # keeps pyflakes happy |
21 from typing import ( |
26 assert [ |
22 Callable, |
27 Callable, |
23 List, |
28 List, |
24 ) |
29 ] |
25 |
|
26 |
30 |
27 # modelled after templater.templatepath: |
31 # modelled after templater.templatepath: |
28 if getattr(sys, 'frozen', None) is not None: |
32 if getattr(sys, 'frozen', None) is not None: |
29 module = pycompat.sysexecutable |
33 module = pycompat.sysexecutable |
30 else: |
34 else: |