-
Notifications
You must be signed in to change notification settings - Fork 453
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix CLI command usage regressions #386
Conversation
Current coverage is
|
@@ -248,12 +248,12 @@ class extract_messages(Command): | |||
'set project version in output'), | |||
('add-comments=', 'c', | |||
'place comment block with TAG (or those preceding keyword lines) in ' | |||
'output file. Separate multiple TAGs with commas(,)'), | |||
'output file. Separate multiple TAGs with commas(,)'), # TODO: Support repetition of this argument |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not strictly necessary, but I'm a fan of linking these to issue numbers, like TODO(#386): or something.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refs are visible in the Git commit messages too, so not going to bother adding issue id this time :)
Fixes python-babel#384 (python-babel#384) Thanks to @ajaeger for the bug report.
The 'no-wrap', 'ignore-obsolete', 'no-fuzzy-matching', 'previous' and 'update-header-comment' were not correctly parsed in the update_catalog command.
if split: # Generate a command line with multiple -ks | ||
kwarg_text = " ".join("-k %s" % kwarg_spec for kwarg_spec in kwarg_specs) | ||
else: # Generate a single space-separated -k | ||
kwarg_text = "-k \"%s\"" % " ".join(kwarg_specs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's cleaner to use single quotes (') for the outer string to avoid needing to escape the inner double quote ("), but up to you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haha, honestly using double quotes is a habit I've learned both from writing C and from the fact that the double quote is easier to write on a Finnish keyboard than the single quote: Shift+2 vs. a separate key right next to Enter :)
But yeah, could've just as well used single quotes there!
Version 2.3.3 ------------- (Bugfix release, released on April 12th) Bugfixes ~~~~~~~~ * CLI: Usage regressions that had snuck in between 2.2 and 2.3 should be no more. (python-babel/babel#386) Thanks to @ajaeger, @sebdiem and @jcristovao for bug reports and patches.
This fixes #384 and includes @sebdiem 's patch from #383 (which fixes #385 too).