Mercurial > public > mercurial-scm > hg-stable
diff tests/test-duplicateoptions.py @ 43076:2372284d9457
formatting: blacken the codebase
This is using my patch to black
(https://github.com/psf/black/pull/826) so we don't un-wrap collection
literals.
Done with:
hg files 'set:**.py - mercurial/thirdparty/** - "contrib/python-zstandard/**"' | xargs black -S
# skip-blame mass-reformatting only
# no-check-commit reformats foo_bar functions
Differential Revision: https://phab.mercurial-scm.org/D6971
author | Augie Fackler <augie@google.com> |
---|---|
date | Sun, 06 Oct 2019 09:45:02 -0400 |
parents | aaad36b88298 |
children | 6000f5b25c9b |
line wrap: on
line diff
--- a/tests/test-duplicateoptions.py Sat Oct 05 10:29:34 2019 -0400 +++ b/tests/test-duplicateoptions.py Sun Oct 06 09:45:02 2019 -0400 @@ -10,7 +10,8 @@ try: import sqlite3 - del sqlite3 # unused, just checking that import works + + del sqlite3 # unused, just checking that import works except ImportError: ignore.add(b'sqlitestore') @@ -41,8 +42,9 @@ seenshort = globalshort.copy() seenlong = globallong.copy() for option in entry[1]: - if ((option[0] and option[0] in seenshort) or - (option[1] and option[1] in seenlong)): + if (option[0] and option[0] in seenshort) or ( + option[1] and option[1] in seenlong + ): print("command '" + cmd + "' has duplicate option " + str(option)) seenshort.add(option[0]) seenlong.add(option[1])