comparison mercurial/scmwindows.py @ 51285:9d3721552b6c

pytype: import typing directly First we no longer needs the pycompat layer, second having the types imported in all case will allow to use them more directly in type annotation, something important to upgrade the old "type comment" to proper type annotation. A lot a stupid assert are needed to keep pyflakes happy. We should be able to remove most of them once the type comment have been upgraded.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 20 Dec 2023 12:51:20 +0100
parents 7a80a614c9e5
children
comparison
equal deleted inserted replaced
51284:58d39c7865e5 51285:9d3721552b6c
1 import os 1 import os
2 import winreg # pytype: disable=import-error 2 import winreg # pytype: disable=import-error
3 3
4 from typing import ( 4 from typing import (
5 List, 5 List,
6 TYPE_CHECKING,
6 Tuple, 7 Tuple,
7 ) 8 )
8 9
9 from . import ( 10 from . import (
10 encoding, 11 encoding,
11 pycompat, 12 pycompat,
12 util, 13 util,
13 win32, 14 win32,
14 ) 15 )
15 16
16 if pycompat.TYPE_CHECKING: 17 if TYPE_CHECKING:
17 from . import ui as uimod 18 from . import ui as uimod
18 19
19 # MS-DOS 'more' is the only pager available by default on Windows. 20 # MS-DOS 'more' is the only pager available by default on Windows.
20 fallbackpager = b'more' 21 fallbackpager = b'more'
21 22