##// END OF EJS Templates
windows: suppress pytype warnings for Windows imports and functions...
Matt Harbison -
r44207:fe73ec69 default
parent child Browse files
Show More
@@ -99,7 +99,7 b' if ispy3:'
99 99 # Otherwise non-ASCII filenames in existing repositories would be
100 100 # corrupted.
101 101 # This must be set once prior to any fsencode/fsdecode calls.
102 sys._enablelegacywindowsfsencoding()
102 sys._enablelegacywindowsfsencoding() # pytype: disable=module-attr
103 103
104 104 fsencode = os.fsencode
105 105 fsdecode = os.fsdecode
@@ -10,11 +10,12 b' from . import ('
10 10 )
11 11
12 12 try:
13 import _winreg as winreg
13 import _winreg as winreg # pytype: disable=import-error
14 14
15 15 winreg.CloseKey
16 16 except ImportError:
17 import winreg
17 # py2 only
18 import winreg # pytype: disable=import-error
18 19
19 20 # MS-DOS 'more' is the only pager available by default on Windows.
20 21 fallbackpager = b'more'
@@ -26,11 +26,12 b' from . import ('
26 26 )
27 27
28 28 try:
29 import _winreg as winreg
29 import _winreg as winreg # pytype: disable=import-error
30 30
31 31 winreg.CloseKey
32 32 except ImportError:
33 import winreg
33 # py2 only
34 import winreg # pytype: disable=import-error
34 35
35 36 osutil = policy.importmod('osutil')
36 37
@@ -282,7 +283,7 b' def setbinary(fd):'
282 283 # fileno(), usually set to -1.
283 284 fno = getattr(fd, 'fileno', None)
284 285 if fno is not None and fno() >= 0:
285 msvcrt.setmode(fno(), os.O_BINARY)
286 msvcrt.setmode(fno(), os.O_BINARY) # pytype: disable=module-attr
286 287
287 288
288 289 def pconvert(path):
General Comments 0
You need to be logged in to leave comments. Login now