Skip to content

argparse: 'name' variable unused when handling ArgumentTypeError #96548

Closed
@JonathonReinhart

Description

@JonathonReinhart

The name variable in this block is unused:

cpython/Lib/argparse.py

Lines 2525 to 2528 in ac4ddab

except ArgumentTypeError as err:
name = getattr(action.type, '__name__', repr(action.type))
msg = str(err)
raise ArgumentError(action, msg)

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