diff mercurial/httpconnection.py @ 41759:aaad36b88298

cleanup: use () to wrap long lines instead of \ This is a little less brittle, and often helps indentation. In a surprising number of cases the entire cleanup was deleting the \, as the expression was *already* parenthesized in a workable way. Differential Revision: https://phab.mercurial-scm.org/D5993
author Augie Fackler <augie@google.com>
date Wed, 20 Feb 2019 19:28:51 -0500
parents c53f0ead5781
children 57875cf423c9
line wrap: on
line diff
--- a/mercurial/httpconnection.py	Sun Jan 13 20:13:22 2019 -0500
+++ b/mercurial/httpconnection.py	Wed Feb 20 19:28:51 2019 -0500
@@ -109,10 +109,10 @@
             schemes, prefix = [p[0]], p[1]
         else:
             schemes = (auth.get('schemes') or 'https').split()
-        if (prefix == '*' or hostpath.startswith(prefix)) and \
-            (len(prefix) > bestlen or (len(prefix) == bestlen and \
-                not bestuser and 'username' in auth)) \
-             and scheme in schemes:
+        if ((prefix == '*' or hostpath.startswith(prefix)) and
+            (len(prefix) > bestlen or (len(prefix) == bestlen and
+                                       not bestuser and 'username' in auth))
+            and scheme in schemes):
             bestlen = len(prefix)
             bestauth = group, auth
             bestuser = auth.get('username')