Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
martinjm97 committed Jul 23, 2020
2 parents 68ef874 + 3969ef6 commit 3032e1f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ class MyTap(Tap):

### Help string

Single line comments are automatically parsed into the help string provided when running `python main.py -h`. The type and default values of arguments are also provided in the help string.
Single line and/or multiline comments which appear after the argument are automatically parsed into the help string provided when running `python main.py -h`. The type and default values of arguments are also provided in the help string.

```python
"""main.py"""
Expand All @@ -138,6 +138,7 @@ from tap import Tap
class MyTap(Tap):
x: float # What am I?
pi: float = 3.14 # I'm pi!
"""Pi is my favorite number!"""

args = MyTap().parse_args()
```
Expand All @@ -150,7 +151,7 @@ usage: demo.py --x X [--pi PI] [-h]
optional arguments:
--x X (float, required) What am I?
--pi PI (float, default=3.14) I'm pi!
--pi PI (float, default=3.14) I'm pi! Pi is my favorite number.
-h, --help show this help message and exit
```

Expand Down

0 comments on commit 3032e1f

Please sign in to comment.