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 |
ENuge
Apr 11, 2016
Contributor
Not strictly necessary, but I'm a fan of linking these to issue numbers, like TODO(#386): or something.
Not strictly necessary, but I'm a fan of linking these to issue numbers, like TODO(#386): or something.
akx
Apr 12, 2016
Author
Member
Refs are visible in the Git commit messages too, so not going to bother adding issue id this time :)
Refs are visible in the Git commit messages too, so not going to bother adding issue id this time :)
self.keywords = keywords | ||
|
||
if not self.keywords: | ||
raise DistutilsOptionError('no keywords specified') |
ENuge
Apr 11, 2016
Contributor
I think the old error message ('you must specify new keywords if you disable the default ones') was more descriptive, given that's the only time this will happen.
I think the old error message ('you must specify new keywords if you disable the default ones') was more descriptive, given that's the only time this will happen.
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) |
ENuge
Apr 12, 2016
Contributor
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.
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.
akx
Apr 12, 2016
Author
Member
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!
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).