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

config: fix BooleanAttribute default=True #2084

Merged
merged 1 commit into from
Jun 3, 2021

Conversation

half-duplex
Copy link
Member

Description

Makes default=True work correctly for BooleanAttributes - see: url.py not working in 7.1.0.

I'm not sure why that stub was overridden, but I can't think of a reason BoolAttr would need to behave differently from the normal BaseValidated._parse(). @dgw?

Includes lazy test of default default and default=True. It might belong in test/config/test_config_types.py but that's harder and I'm out of time and brain to melt.

Checklist

  • I have read CONTRIBUTING.md
  • I can and do license this contribution under the EFLv2
  • No issues are reported by make qa (runs make quality and make test)
  • I have tested the functionality of the things this change touches

@dgw dgw changed the base branch from 7.1.x to master June 2, 2021 20:38
@dgw
Copy link
Member

dgw commented Jun 2, 2021

We're sending all PRs to master for now, and I'm cherry-picking bugfixes like this to 7.1.x when needed. Will rebase so checks can run. (Never mind that, mal said on IRC that he'll rebase and fix the lint failure at the same time.)

@dgw dgw added this to the 7.1.1 milestone Jun 2, 2021
@dgw dgw added the Bugfix Generally, PRs that reference (and fix) one or more issue(s) label Jun 2, 2021
@dgw dgw self-requested a review June 2, 2021 20:40
@half-duplex half-duplex force-pushed the fix-booleanattr-default branch from 0687fc8 to dd87be5 Compare June 2, 2021 20:48
Copy link
Member

@dgw dgw left a comment

Choose a reason for hiding this comment

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

I have tested both the new test (by running it against the current state of 7.1.x, where it fails) and the new behavior (by checking out this branch, where the new test now passes). LGTM 🚀

I'm not sure why that stub was overridden, but I can't think of a reason BoolAttr would need to behave differently from the normal BaseValidated._parse(). @dgw?

It's a good question, and I don't have an answer. That override was part of #2044, and no one questioned it, so it got merged.

@dgw dgw requested a review from Exirel June 2, 2021 22:03
Copy link
Contributor

@Exirel Exirel left a comment

Choose a reason for hiding this comment

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

🐑 🇮🇹

@dgw dgw merged commit 56d84d1 into sopel-irc:master Jun 3, 2021
dgw pushed a commit that referenced this pull request Jun 3, 2021
Note: Backport of #2084 for 7.1.x branch.
(dd87be5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bugfix Generally, PRs that reference (and fix) one or more issue(s)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants