Skip to content

[BUG] #11

@rnm-sxm

Description

@rnm-sxm

ArgUI's Logo


Describe the bug

When an argparse option defined with action="store_true" has its default set to True before creating an argui.Interface, the submitted value and the rendered UI disagree.

Expected behavior

A store_true option whose default is True should render as checked when the GUI opens, so the visible switch state matches the effective submitted value.

Steps to Reproduce

repro.py

  1. Create an ArgumentParser.
  2. Add --java with action="store_true".
  3. Set action.default = True.
  4. Launch argui.Interface.
  5. Observe that the java switch is initially shown as unchecked.
  6. Submit without changing the switch.
  7. gui.getArgs() returns Namespace(java=True).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions