Mercurial > public > mercurial-scm > hg-stable
diff mercurial/win32.py @ 45957:89a2afe31e82
formating: upgrade to black 20.8b1
This required a couple of small tweaks to un-confuse black, but now it
works. Big formatting changes come from:
* Dramatically improved collection-splitting logic upstream
* Black having a strong (correct IMO) opinion that """ is better than '''
Differential Revision: https://phab.mercurial-scm.org/D9430
author | Augie Fackler <raf@durin42.com> |
---|---|
date | Fri, 27 Nov 2020 17:03:29 -0500 |
parents | 9f70512ae2cf |
children | 65f437c240f2 |
line wrap: on
line diff
--- a/mercurial/win32.py Fri Nov 27 17:00:00 2020 -0500 +++ b/mercurial/win32.py Fri Nov 27 17:03:29 2020 -0500 @@ -385,13 +385,13 @@ def checkcertificatechain(cert, build=True): - '''Tests the given certificate to see if there is a complete chain to a - trusted root certificate. As a side effect, missing certificates are - downloaded and installed unless ``build=False``. True is returned if a - chain to a trusted root exists (even if built on the fly), otherwise - False. NB: A chain to a trusted root does NOT imply that the certificate - is valid. - ''' + """Tests the given certificate to see if there is a complete chain to a + trusted root certificate. As a side effect, missing certificates are + downloaded and installed unless ``build=False``. True is returned if a + chain to a trusted root exists (even if built on the fly), otherwise + False. NB: A chain to a trusted root does NOT imply that the certificate + is valid. + """ chainctxptr = ctypes.POINTER(CERT_CHAIN_CONTEXT) @@ -488,8 +488,8 @@ def testpid(pid): - '''return True if pid is still running or unable to - determine, False otherwise''' + """return True if pid is still running or unable to + determine, False otherwise""" h = _kernel32.OpenProcess(_PROCESS_QUERY_INFORMATION, False, pid) if h: try: @@ -576,10 +576,10 @@ def setsignalhandler(): - '''Register a termination handler for console events including + """Register a termination handler for console events including CTRL+C. python signal handlers do not work well with socket operations. - ''' + """ def handler(event): _kernel32.ExitProcess(1) @@ -627,8 +627,8 @@ def enablevtmode(): - '''Enable virtual terminal mode for the associated console. Return True if - enabled, else False.''' + """Enable virtual terminal mode for the associated console. Return True if + enabled, else False.""" ENABLE_VIRTUAL_TERMINAL_PROCESSING = 0x4