diff options
author | Jérémie Detrey <jdetrey@users.noreply.github.com> | 2024-09-24 19:54:50 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-24 19:54:50 (GMT) |
commit | d3c76dff444046504754a437dceebc9a9c87ef18 (patch) | |
tree | e16f5d3dba56b10a267a9a464a19c41db817def3 /Lib/argparse.py | |
parent | af8403a58dbe45130400a133f756cbf53c5f1d7e (diff) | |
download | cpython-d3c76dff444046504754a437dceebc9a9c87ef18.zip cpython-d3c76dff444046504754a437dceebc9a9c87ef18.tar.gz cpython-d3c76dff444046504754a437dceebc9a9c87ef18.tar.bz2 |
bpo-44864: Do not translate user-provided strings in ArgumentParser.add_subparsers() (GH-27667)
Call _() on literal strings only.
Diffstat (limited to 'Lib/argparse.py')
-rw-r--r-- | Lib/argparse.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/argparse.py b/Lib/argparse.py index 694c46d..690b2a9 100644 --- a/Lib/argparse.py +++ b/Lib/argparse.py @@ -1804,8 +1804,8 @@ class ArgumentParser(_AttributeHolder, _ActionsContainer): kwargs.setdefault('parser_class', type(self)) if 'title' in kwargs or 'description' in kwargs: - title = _(kwargs.pop('title', 'subcommands')) - description = _(kwargs.pop('description', None)) + title = kwargs.pop('title', _('subcommands')) + description = kwargs.pop('description', None) self._subparsers = self.add_argument_group(title, description) else: self._subparsers = self._positionals |