Vinay Sajip
9ae505041f
Issue #12713 : reverted fix pending further discussion.
10 years ago
Vinay Sajip
ef948cd058
Closes #12713 : Allowed abbreviation of subcommands in argparse.
10 years ago
Berker Peksag
841b930a41
Issue #17940 : Remove redundant code from _Section.format_help()
Output of func(*args) stored in the next line:
item_help = join([func(*args) for func, args in self.items])
_Section.items only used by HelpFormatter._add_item() and it looks
like it doesn't have any side effects.
Patch by Yogesh Chaudhari.
10 years ago
Berker Peksag
76b1714be8
Issue #24360 : Improve __repr__ of argparse.Namespace() for invalid identifiers.
Patch by Matthias Bussonnier.
11 years ago
Berker Peksag
8089cd642f
Issue #14910 : Add allow_abbrev parameter to argparse.ArgumentParser.
Patch by Jonathan Paugh, Steven Bethard, paul j3 and Daniel Eriksson.
11 years ago
Serhiy Storchaka
08448a1f4d
Issue #23326 : Removed __ne__ implementations. Since fixing default __ne__
implementation in issue #21408 they are redundant.
11 years ago
Georg Brandl
2514f52f4f
Closes #22675 : fix typo.
11 years ago
R David Murray
7570cbdc6b
#9351 : set_defaults on subparser is no longer ignored if set on parent.
Before, if a default was set on the parent parser, any default for that
variable set via set_defaults on a subparser would be ignored. Now
the subparser set_defaults is honored.
Patch by Jyrki Pullianinen.
11 years ago
Raymond Hettinger
dea46ec965
Issue #21481 : Teach argparse equality tests to return NotImplemented when comparing to unknown types.
12 years ago
Serhiy Storchaka
f451112413
Issue #13107 : argparse and optparse no longer raises an exception when output
a help on environment with too small COLUMNS. Based on patch by
Elazar Gershuni.
12 years ago
Eli Bendersky
cdac551675
Issue #18920 : argparse's default version action (for -v, --version) should
output to stdout, matching the 'python -v'
Reported by Wolfgang Maier
13 years ago
Terry Jan Reedy
8e7586bd44
Issue #17047 : remove doubled words added in 3.4,
as reported by Serhiy Storchaka and Matthew Barnett.
13 years ago
Giampaolo Rodola'
2f50aaf2ff
modernize some modules' code by using with statement around open()
13 years ago
Andrew Svetlov
f7a17b48d7
Replace IOError with OSError ( #16715 )
13 years ago
Petri Lehtinen
74d6c250e1
#11175 : argparse.FileType now accepts encoding and errors arguments.
Patch by Lucas Maystre.
13 years ago
Philip Jenvey
4993cc0a5b
utilize yield from
13 years ago
Barry Warsaw
2dceb359cb
Update merge from 2.7: s/basetring/str
14 years ago
Barry Warsaw
03937a8755
A follow up for issue #15906 : change the test for calling the type conversion
on the action's default, reverting it back to previous behavior. Conversion
is only done on string defaults.
Add a test for this and another test that ensures such type conversions are
only called once.
14 years ago
Barry Warsaw
eaae1b76ae
A follow up for issue #15906 : change the test for calling the type conversion
on the action's default, reverting it back to previous behavior. Conversion
is only done on string defaults.
Add a test for this and another test that ensures such type conversions are
only called once.
14 years ago
Barry Warsaw
4b2f9e914d
- Issue #15906 : Fix a regression in argparse caused by the preceding change,
when action='append', type='str' and default=[].
14 years ago
Barry Warsaw
03fcfbef0a
- Issue #15906 : Fix a regression in argparse caused by the preceding change,
when action='append', type='str' and default=[].
14 years ago
R David Murray
a99c7dedcb
#15847 : allow args to be a tuple in parse_args
This fixes a regression introduced by the fix for issue #13922 . Although args
is not documented as being allowed to be a tuple, previously this worked and
so naturally there are programs in the field that depend on it.
Patch by Zbyszek Jędrzejewski-Szmek.
14 years ago
R David Murray
b522828d2a
#15847 : allow args to be a tuple in parse_args
This fixes a regression introduced by the fix for issue #13922 . Although args
is not documented as being allowed to be a tuple, previously this worked and
so naturally there are programs in the field that depend on it.
Patch by Zbyszek Jędrzejewski-Szmek.
14 years ago
Zbigniew Jędrzejewski-Szmek
55c206ab2f
Fix bug with argparse.Parser.parse_args(*args)
14 years ago
R David Murray
201018718f
#12776,#11839: call argparse type function only once.
Before, the type function was called twice in the case where the default
was specified and the argument was given as well. This was especially
problematic for the FileType type, as a default file would always be
opened, even if a file argument was specified on the command line.
Patch by Arnaud Fontaine, with additional test by Mike Meyer.
14 years ago
R David Murray
6fb8fb17bf
#12776,#11839: call argparse type function only once.
Before, the type function was called twice in the case where the default
was specified and the argument was given as well. This was especially
problematic for the FileType type, as a default file would always be
opened, even if a file argument was specified on the command line.
Patch by Arnaud Fontaine, with additional test by Mike Meyer.
14 years ago
R David Murray
68f555c03a
#13922 : argparse no longer incorrectly strips '--' after the first one.
Patch by Jeff Knupp.
14 years ago
R David Murray
00528e8fec
#13922 : argparse no longer incorrectly strips '--' after the first one.
Patch by Jeff Knupp.
14 years ago
R David Murray
056c31f9cc
#12353 : argparse now correctly handles null argument values.
Patch by Torsten Landschoff.
14 years ago
R David Murray
b94082a71b
#12353 : argparse now correctly handles null argument values.
Patch by Torsten Landschoff.
14 years ago
R David Murray
1a2c1fbfd2
#14391 : clarify docstring discussion of Action's 'type' argument's value.
14 years ago
R David Murray
15cd9a0be4
#14391 : clarify docstring discussion of Action's 'type' argument's value.
14 years ago
Florent Xicluna
af1adbeedd
Issue #13248 : argparse: Remove obsolete argument "version" of ArgumentParser.
14 years ago
Florent Xicluna
5d1155c08e
Closes #13258 : Use callable() built-in in the standard library.
14 years ago
Ezio Melotti
d8b509b192
#13012 : use splitlines(keepends=True/False) instead of splitlines(0/1).
15 years ago
R David Murray
f97c59aaba
#10424 : argument names are now included in the missing argument message
Fix and initial test patch by Michele Orrù.
15 years ago
Steven Bethard
7cb20a8605
Issue #9347 : Fix formatting for tuples in argparse type= error messages.
15 years ago
Steven Bethard
e3c11b44e3
Issue #9347 : Fix formatting for tuples in argparse type= error messages.
15 years ago
Steven Bethard
bc3b104e46
Issue #9026 : Fix order of argparse sub-commands in help messages. (Merged from 3.2.)
15 years ago
Steven Bethard
8a6a198abf
Issue #9026 : Fix order of argparse sub-commands in help messages.
15 years ago
Steven Bethard
539586296d
Issue #9348 : Raise an early error if argparse nargs and metavar don't match. (Merge from 3.2.)
15 years ago
Steven Bethard
8d9a4628c3
Issue #9348 : Raise an early error if argparse nargs and metavar don't match.
15 years ago
Steven Bethard
0331e906d6
Issue #11174 : Add argparse.MetavarTypeHelpFormatter, which uses type names
for the names of optional and positional arguments in help messages.
15 years ago
Steven Bethard
7f41b88bb7
#10680 : fix mutually exclusive arguments in argument groups.
15 years ago
Georg Brandl
0f6b47a338
#10680 : fix mutually exclusive arguments in argument groups.
15 years ago
Steven Bethard
b02701101b
Issue #9509 : make argarse properly handle IOErrors raised by argparse.FileType. Approved by Georg in the tracker.
15 years ago
Steven Bethard
f8583acb53
Issue #9509 : make argarse properly handle IOErrors raised by argparse.FileType. Approved by Georg in the tracker.
15 years ago
Steven Bethard
fd311a712d
Add subparser aliases for argparse. Resolves issue 9324. Approved by Georg for beta2 on the tracker.
15 years ago
Éric Araujo
1215915045
Use proper plural forms in argparse ( #4391 )
15 years ago
Éric Araujo
bb48a8b59a
Allow translators to reorder placeholders in localizable messages from
argparse (#10528 ).
There is no unit test; I checked with xgettext that no more warnings
were emitted. Steven approved the change.
15 years ago