Skip to content

Fix parser default from _handler to func #11

@Andfreitag

Description

@Andfreitag

@dvm-shlee

In src/brkraw_cli_addon/plugin.py, the line:

parser.set_defaults(_handler=_run)

should be changed to:

parser.set_defaults(func=_run)

This change aligns with line 125 in
brkraw/src/brkraw/cli/main.py:
https://github.com/BrkRaw/brkraw/blob/main/src/brkraw/cli/main.py

Reference snippet:

if not hasattr(args, "func"):
    parser.print_help()
    return 2

Using _handler caused issues on my setup, for example, I could not actually use the function foo.
I'm not completely sure about the full structure, but this quick fix worked perfectly for me in the terminal.
I did not submit a pull request as I am not confident about the overall structure and potential side effects.

I also want to say that I’m genuinely impressed with the whole BrkRaw project rework!

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