Skip to content

Commit f4d5b14

Browse files
committed
[gn] Give two scripts argparse.RawDescriptionHelpFormatter
Without this, the doc string is put in a single line. These scripts have multi-line docstrings, so this makes their --help output look much nicer. Otherwise, no behavior change.
1 parent 5c0eb1a commit f4d5b14

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

llvm/utils/gn/build/symbol_exports.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@
1515

1616

1717
def main():
18-
parser = argparse.ArgumentParser(description=__doc__)
18+
parser = argparse.ArgumentParser(
19+
description=__doc__,
20+
formatter_class=argparse.RawDescriptionHelpFormatter)
1921
parser.add_argument("--format", required=True, choices=("linux", "mac", "win"))
2022
parser.add_argument("source")
2123
parser.add_argument("output")

llvm/utils/gn/build/symlink_or_copy.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212

1313

1414
def main():
15-
parser = argparse.ArgumentParser(description=__doc__)
15+
parser = argparse.ArgumentParser(
16+
description=__doc__,
17+
formatter_class=argparse.RawDescriptionHelpFormatter)
1618
parser.add_argument(
1719
"--stamp", required=True, help="name of a file whose mtime is updated on run"
1820
)

0 commit comments

Comments
 (0)