Skip to content

% in documentation breaks Argumentparser #124260

@BIRDSLab

Description

@BIRDSLab

Bug report

Bug description:

from argparse import ArgumentParser
parser = ArgumentParser()
parser.add_argument(
    "-v", dest="verbose", 
    help="duck around %", 
    action='store_true' 
)    
# Find out
options = parser.parse_args()

Run this with a '-h' on the commandline, and watch the pretty backtrace

CPython versions tested on:

3.10

Operating systems tested on:

Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions