Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add from_option_string to RPCOptions #921

Merged
merged 2 commits into from
Dec 18, 2024

Conversation

anvacaru
Copy link
Contributor

To preserve the Argparse argument when the dest does not match the argument itself, from_option_string must define that mapping.

        args.add_argument(
            '--no-log-rewrites',
            dest='log_succ_rewrites',
            default=None,
            action='store_false',
            help='Do not log traces of any simplification and rewrite rule application.',
        )

In this case, (no-)log-rewrites did not match log_succ_rewrites and the RPCOptions class did not have a from_option_string function. When no-log-rewrites: true was used in the TOML file, a new option, log_rewrites was set to false instead of setting log_succ_rewrites to false.

Having log-rewrites mapped to log_succ_rewrites in the RPCOptions.from_option_string class means that when the TOML file has no-log-rewrites: true, the log_succ_rewrites will be set to False.

@anvacaru anvacaru added the bug Something isn't working label Dec 18, 2024
@anvacaru anvacaru self-assigned this Dec 18, 2024
Copy link
Collaborator

@palinatolmach palinatolmach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice find!

@automergerpr-permission-manager automergerpr-permission-manager bot merged commit 40459b1 into master Dec 18, 2024
12 checks passed
@automergerpr-permission-manager automergerpr-permission-manager bot deleted the hotfix/no-log-rewrites branch December 18, 2024 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants