Skip to content

[1.5.0] Is it possible to provide a type callable access to self from within a command set, similar to how choices_method works? #1243

Description

@ddejohn

I'd like to run some type conversion on a few arguments inside a command set, but it needs access to self. If I simply add the methods as the type argument in parser.add_argument I always get an invalid value warning from the parser without that callable having even been called.

I assume this is caused by the fact that the type callable requires there to be one argument, but if using a method, self must be provided?

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