comparison mercurial/pycompat.py @ 43768:fe73ec69350e

windows: suppress pytype warnings for Windows imports and functions This should allow the modules to not be excluded, and not generate complaints on non Windows platforms. Differential Revision: https://phab.mercurial-scm.org/D7510
author Matt Harbison <matt_harbison@yahoo.com>
date Fri, 22 Nov 2019 23:55:57 -0500
parents 9f70512ae2cf
children 7b14d649af1b
comparison
equal deleted inserted replaced
43767:f3b23d5c15fd 43768:fe73ec69350e
97 if os.name == r'nt' and sys.version_info >= (3, 6): 97 if os.name == r'nt' and sys.version_info >= (3, 6):
98 # MBCS (or ANSI) filesystem encoding must be used as before. 98 # MBCS (or ANSI) filesystem encoding must be used as before.
99 # Otherwise non-ASCII filenames in existing repositories would be 99 # Otherwise non-ASCII filenames in existing repositories would be
100 # corrupted. 100 # corrupted.
101 # This must be set once prior to any fsencode/fsdecode calls. 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 fsencode = os.fsencode 104 fsencode = os.fsencode
105 fsdecode = os.fsdecode 105 fsdecode = os.fsdecode
106 oscurdir = os.curdir.encode('ascii') 106 oscurdir = os.curdir.encode('ascii')
107 oslinesep = os.linesep.encode('ascii') 107 oslinesep = os.linesep.encode('ascii')