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 #35 - bool typed params are not passed correctly #44

Merged
merged 2 commits into from
May 20, 2020

Conversation

brandonscript
Copy link
Contributor

This does a simple check that looks for bool typed params and converts them to string values in lowercase.

This does a simple check that looks for `bool` typed params and converts them to string values in lowercase.
Copy link
Contributor

@3lixy 3lixy left a comment

Choose a reason for hiding this comment

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

.iteritems() i believe is python2 only http://python-future.org/compatible_idioms.html. I think this repo is py3 compatible.

if you expect a value to be bool then i would use
if value is True

Would you be able to add any unit tests?

- iteritems() is only py2 compatible, changing to items(), although inefficient, should be fine for this and does not require importing future
- Add a verbose check to ensure bool type param is True
@brandonscript
Copy link
Contributor Author

Should be py3 compatible now, and added if value is True. I can add a couple of tests, but which test file should I add them to?

@celiao
Copy link
Owner

celiao commented May 20, 2020

I tested the code and it works.

@celiao celiao merged commit 051bb12 into celiao:master May 20, 2020
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.

3 participants