Mercurial > hg
comparison tests/test-duplicateoptions.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 | c93d046d4300 |
children | 2372284d9457 |
comparison
equal
deleted
inserted
replaced
41758:15d3facfa40a | 41759:aaad36b88298 |
---|---|
39 | 39 |
40 for cmd, entry in commands.table.items(): | 40 for cmd, entry in commands.table.items(): |
41 seenshort = globalshort.copy() | 41 seenshort = globalshort.copy() |
42 seenlong = globallong.copy() | 42 seenlong = globallong.copy() |
43 for option in entry[1]: | 43 for option in entry[1]: |
44 if (option[0] and option[0] in seenshort) or \ | 44 if ((option[0] and option[0] in seenshort) or |
45 (option[1] and option[1] in seenlong): | 45 (option[1] and option[1] in seenlong)): |
46 print("command '" + cmd + "' has duplicate option " + str(option)) | 46 print("command '" + cmd + "' has duplicate option " + str(option)) |
47 seenshort.add(option[0]) | 47 seenshort.add(option[0]) |
48 seenlong.add(option[1]) | 48 seenlong.add(option[1]) |