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

Fix set use live default #63

Merged
merged 2 commits into from
Nov 19, 2024
Merged

Conversation

andy-isoc
Copy link
Contributor

@andy-isoc andy-isoc commented Nov 19, 2024

I'm a bit out of my depth with the subtleties of Python here but it looks like using the cls variable _use_live as a method param default is not reading the cls value set elsewhere and is always evaluating to the hard-coded default True. Setting it to None and then checking when it's read and applying the default there seems to work. Though happy to change it if there's a more Pythonic approach to fixing this.

Note, this fixes #62

@andy-isoc
Copy link
Contributor Author

Hmmm, the tests have failed. They passed on my branch: https://github.com/andy-isoc/hdx-python-country/actions/runs/11911364328 (and they passed for me locally)
Not sure if this is something I've done wrong?

@mcarans
Copy link
Contributor

mcarans commented Nov 19, 2024

I will merge this and fix this issue with running tests in Hatch. Thanks for your PR!

@mcarans mcarans merged commit 120dff8 into OCHA-DAP:main Nov 19, 2024
1 check failed
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.

set_use_live_default not working as expected
2 participants