Skip to content

Brace-based template arguments crash literal parsing with TypeError #703

Description

@codewithfourtix

parser.DefaultParseValue('{{name}}') raises TypeError: unhashable type: 'set' on current master. The same happens for {[1]: 2} and {[1]}. These inputs should fall back to the original string, as other values that cannot be parsed as literals do. This currently breaks CLI arguments containing brace-based templates.

I plan to handle TypeError alongside the existing literal-parsing exceptions and add regression coverage, while preserving valid dict/set parsing.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions