Mercurial > public > mercurial-scm > hg
diff contrib/relnotes @ 43659:99e231afc29c
black: blacken scripts
test-check-format.t doesn't appear to detect Python scripts with shebangs.
But my editor which is configured to auto run black on Python files does
and it appears some files are not blackened.
This commit blackens scripts that need it.
# skip-blame reformatting
Differential Revision: https://phab.mercurial-scm.org/D7420
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Thu, 14 Nov 2019 20:35:11 -0800 |
parents | 530d211ae9a8 |
children |
line wrap: on
line diff
--- a/contrib/relnotes Tue Nov 12 10:17:59 2019 -0500 +++ b/contrib/relnotes Thu Nov 14 20:35:11 2019 -0800 @@ -98,6 +98,7 @@ (r"shelve|unshelve", "extensions"), ] + def wikify(desc): desc = desc.replace("(issue", "(Bts:issue") desc = re.sub(r"\b([0-9a-f]{12})\b", r"Cset:\1", desc) @@ -107,6 +108,7 @@ desc = re.sub(r"\b(\S*__\S*)\b", r"`\1`", desc) return desc + def main(): desc = "example: %(prog)s 4.7.2 --stoprev 4.8rc0" ap = argparse.ArgumentParser(description=desc) @@ -200,5 +202,6 @@ for d in sorted(apis): print(" * %s" % d) + if __name__ == "__main__": main()