Skip to content

Commit 72a52da

Browse files
authored
Replace custom CLI with argparse (#83)
2 parents 4361764 + f67ebc2 commit 72a52da

8 files changed

Lines changed: 278 additions & 266 deletions

File tree

README.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,6 @@ managers.
6262

6363

6464

65-
### blurb help
66-
67-
**blurb** is self-documenting through the `blurb help` subcommand.
68-
Run without any further arguments, it prints a list of all subcommands,
69-
with a one-line summary of the functionality of each. Run with a
70-
third argument, it prints help on that subcommand (e.g. `blurb help release`).
71-
72-
7365
### blurb add
7466

7567
`blurb add` adds a new `Misc/NEWS` entry for you.
@@ -223,6 +215,12 @@ the right thing. If `NEWS` entries were already written to the
223215
final version directory, you'd have to move those around as
224216
part of the cherry-picking process.
225217

218+
## Getting help
219+
220+
Run `blurb --help` for a list of subcommands,
221+
and `blurb <subcommand> --help` for help on a specific subcommand.
222+
223+
226224
## Copyright
227225

228226
**blurb** is Copyright 2015-2018 by Larry Hastings.

RELEASING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@
2525
- [ ] Check installation:
2626

2727
```bash
28-
python -m pip uninstall -y blurb && python -m pip install -U blurb && blurb help
28+
python -m pip uninstall -y blurb && python -m pip install -U blurb && blurb --help
2929
```

src/blurb/_add.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@
2424

2525

2626
def add(*, issue: str | None = None, section: str | None = None):
27-
"""Add a blurb (a Misc/NEWS.d/next entry) to the current CPython repo.
27+
"""Add a blurb (a `Misc/NEWS.d/next` entry) to the current CPython repo.
2828
29-
Use -i/--issue to specify a GitHub issue number or link, e.g.:
29+
Use `-i`/`--issue` to specify a GitHub issue number or link, e.g.:
3030
3131
blurb add -i 12345
3232
# or
3333
blurb add -i https://github.com/python/cpython/issues/12345
3434
35-
Use -s/--section to specify the section name (case-insensitive), e.g.:
35+
Use `-s`/`--section` to specify the section name (case-insensitive), e.g.:
3636
3737
blurb add -s Library
3838
# or
@@ -73,7 +73,7 @@ def add(*, issue: str | None = None, section: str | None = None):
7373
print('Ready for commit.')
7474

7575

76-
add.__doc__ = add.__doc__.format(sections='\n'.join(f'* {s}' for s in sections))
76+
add.__doc__ = add.__doc__.format(sections='\n'.join(f' * {s}' for s in sections))
7777

7878

7979
def _editor_args() -> list[str]:

0 commit comments

Comments
 (0)