Mercurial > public > mercurial-scm > hg-stable
diff mercurial/win32.py @ 51749:493034cc3265
black: format the codebase with 23.3.0
The CI has moved to 23.3.0, which is the last version that supports 3.7
at runtime, so we should honor this change.
# skip-blame mass-reformating only
author | Rapha?l Gom?s <rgomes@octobus.net> |
---|---|
date | Thu, 18 Jul 2024 12:36:12 +0200 |
parents | a9faacdc5943 |
children | 7f0cb9ee0534 |
line wrap: on
line diff
--- a/mercurial/win32.py Thu Jul 18 12:03:29 2024 +0200 +++ b/mercurial/win32.py Thu Jul 18 12:36:12 2024 +0200 @@ -172,6 +172,7 @@ X509_ASN_ENCODING = 0x00000001 PKCS_7_ASN_ENCODING = 0x00010000 + # These structs are only complete enough to achieve what we need. class CERT_CHAIN_CONTEXT(ctypes.Structure): _fields_ = ( @@ -368,7 +369,7 @@ # See https://bugs.python.org/issue28474 code = _kernel32.GetLastError() if code > 0x7FFFFFFF: - code -= 2 ** 32 + code -= 2**32 err = ctypes.WinError(code=code) # pytype: disable=module-attr raise OSError( err.errno, '%s: %s' % (encoding.strfromlocal(name), err.strerror)