Mercurial > public > mercurial-scm > hg
comparison mercurial/scmwindows.py @ 48986:d500df2e8034
pytype: disable a few errors about Windows specific module attributes
These were flagged by pytype 2022.03.21.
Differential Revision: https://phab.mercurial-scm.org/D12401
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Wed, 23 Mar 2022 13:51:40 -0400 |
parents | 6000f5b25c9b |
children | 7a4143428db7 |
comparison
equal
deleted
inserted
replaced
48985:c75dae6e4ca7 | 48986:d500df2e8034 |
---|---|
50 if os.path.isfile(ini): | 50 if os.path.isfile(ini): |
51 rcpath.append(ini) | 51 rcpath.append(ini) |
52 | 52 |
53 # next look for a system rcpath in the registry | 53 # next look for a system rcpath in the registry |
54 value = util.lookupreg( | 54 value = util.lookupreg( |
55 b'SOFTWARE\\Mercurial', None, winreg.HKEY_LOCAL_MACHINE | 55 # pytype: disable=module-attr |
56 b'SOFTWARE\\Mercurial', | |
57 None, | |
58 winreg.HKEY_LOCAL_MACHINE | |
59 # pytype: enable=module-attr | |
56 ) | 60 ) |
57 if value and isinstance(value, bytes): | 61 if value and isinstance(value, bytes): |
58 value = util.localpath(value) | 62 value = util.localpath(value) |
59 for p in value.split(pycompat.ospathsep): | 63 for p in value.split(pycompat.ospathsep): |
60 if p.lower().endswith(b'mercurial.ini'): | 64 if p.lower().endswith(b'mercurial.ini'): |