Mercurial > public > mercurial-scm > hg
diff hgext/acl.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 | 3694c9aaf5e4 |
children | 2372284d9457 |
line wrap: on
line diff
--- a/hgext/acl.py Sun Jan 13 20:13:22 2019 -0500 +++ b/hgext/acl.py Wed Feb 20 19:28:51 2019 -0500 @@ -293,15 +293,15 @@ # if ug is a user name: !username # if ug is a group name: !@groupname ug = ug[1:] - if not ug.startswith('@') and user != ug \ - or ug.startswith('@') and user not in _getusers(ui, ug[1:]): + if (not ug.startswith('@') and user != ug + or ug.startswith('@') and user not in _getusers(ui, ug[1:])): return True # Test for user or group. Format: # if ug is a user name: username # if ug is a group name: @groupname - elif user == ug \ - or ug.startswith('@') and user in _getusers(ui, ug[1:]): + elif (user == ug + or ug.startswith('@') and user in _getusers(ui, ug[1:])): return True return False