python / blurb

Command-line tool to manage CPython Misc/NEWS.d entries
Other
5 stars 4 forks source link

gh-6: add `-i/--issue` and `-s/--section` flags to `blurb add` #16

Open picnixz opened 6 days ago

picnixz commented 6 days ago

Fixes #6. This is an alternative to #15.

@hugovk I've taken out your way of handling positional arguments (but would you consider a PR which refactors blurb in order to use argparse instead?). If you prefer --gh, I can also rename the variable!

hugovk commented 5 days ago

would you consider a PR which refactors blurb in order to use argparse instead?

That could make things easier, but I've not used subcommands much in argparse, how are they? We'd need to make sure all the commands and options work in the same way, blurb is used in a few different bits of automation and we wouldn't want to break any of them.

picnixz commented 5 days ago

That could make things easier, but I've not used subcommands much in argparse, how are they? We'd need to make sure all the commands and options work in the same way, blurb is used in a few different bits of automation and we wouldn't want to break any of them.

From my personal usage of subcommands, it works the same. Actually, a subcommand is just an action that invokes an ArgumentParser. However, it might indeed come with some corner cases which I would first extensively test. If you can tell me where it's being used in automaton parts, then I'd be glad to check if I can make the transition.

hugovk commented 5 days ago

If you can tell me where it's being used in automaton parts, then I'd be glad to check if I can make the transition.

Hmm, well at least here: