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

nicer falsy behavior for LazyConfigValue #584

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

minrk
Copy link
Member

@minrk minrk commented Jun 30, 2020

  • empty lazy config is falsy, non-empty is truthy
  • checking in for empty lazy config returns False, indicating there's no config there

- empty lazy config is falsy, non-empty is truthy
- checking `in` for empty lazy config returns False, indicating there's no config there
@Carreau Carreau added this to the 5.0 milestone Jul 2, 2020
@Carreau
Copy link
Member

Carreau commented Jul 2, 2020

I'm not sure if we should fix the tests, or the __contains__. I can't see why we would like 'foo' in c.foo to be true-ish.

@minrk
Copy link
Member Author

minrk commented Sep 4, 2020

Sorry or leaving this forever. The failing tests were mainly verifying that the LazyConfig was stored so that future access would retrieve the same thing, but the asserts were broken by the new falsiness. So I updated the tests to verify presence in another way.

@Carreau Carreau removed this from the 5.0 milestone Aug 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants