Skip to content

Commit 660c6a3

Browse files
committed
Better argparse documentation for scop-scripts
1 parent fea3124 commit 660c6a3

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

tadashi/_scripts.py

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,25 @@
99

1010
def get_args():
1111
parser = argparse.ArgumentParser()
12-
parser.add_argument("path", help="Path to the source files")
12+
parser.add_argument("path", help="Path to the source file/dir")
1313
parser.add_argument(
14-
"-e", "--extension", help="File extension 'c' or 'f'", default="f"
14+
"-e",
15+
"--extension",
16+
help="File extension 'c' or 'f'",
17+
default="f",
18+
)
19+
parser.add_argument(
20+
"-i",
21+
"--pet",
22+
action="store_true",
23+
help="Use PET instead of polly",
24+
)
25+
parser.add_argument(
26+
"-a",
27+
"--args",
28+
action="append",
29+
help="Args passed to the Polly/PET translator (can be used multiple times)",
1530
)
16-
parser.add_argument("-i", "--pet", action="store_true")
17-
parser.add_argument("-a", "--args", action="append")
1831
args = parser.parse_args()
1932
if not args.args:
2033
args.args = ["flang"]

0 commit comments

Comments
 (0)