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 the unquote function. #58725

Open
wants to merge 3 commits into
base: devel
from

Conversation

Projects
None yet
4 participants
@hobbestigrou
Copy link

commented Jul 4, 2019

Check if the parameter is a string otherwise return the data. Modify the
documentation to add the type.

@sivel
Copy link
Member

left a comment

As I read over this, I feel like we should instead be modifying is_quoted instead of unquote.

Show resolved Hide resolved lib/ansible/parsing/quoting.py Outdated
Show resolved Hide resolved lib/ansible/parsing/quoting.py Outdated
@hobbestigrou

This comment has been minimized.

Copy link
Author

commented Jul 9, 2019

Thanks for the review @sivel. However I'm not sure to understand what do you mean, do you want I rename also the function? If yes, I suppose we must stay compatible and first display a warning.

@ansibot

This comment has been minimized.

Copy link
Contributor

commented Jul 9, 2019

The test ansible-test sanity --test use-compat-six [explain] failed with 1 error:

lib/ansible/parsing/quoting.py:20:1: use `ansible.module_utils.six` instead of `six`

click here for bot help

@hobbestigrou hobbestigrou force-pushed the hobbestigrou:fix_unquote_data branch from 62c401a to 4900f69 Jul 9, 2019

Show resolved Hide resolved lib/ansible/parsing/quoting.py Outdated

@hobbestigrou hobbestigrou force-pushed the hobbestigrou:fix_unquote_data branch from 1969ae4 to ac1c44c Jul 9, 2019

Show resolved Hide resolved lib/ansible/parsing/quoting.py Outdated

@hobbestigrou hobbestigrou force-pushed the hobbestigrou:fix_unquote_data branch from 0398715 to 8e4fa3c Jul 9, 2019

@hobbestigrou

This comment has been minimized.

Copy link
Author

commented Jul 11, 2019

That seems good for you @sivel now?

@bcoca bcoca removed the needs_triage label Jul 11, 2019

hobbestigrou added some commits Jul 4, 2019

Fix the unquote function.
Check if the parameter is a string otherwise return the data. Modify the
documentation to add the type.
Check the path is a string.
Check the given path is a string and add modify the documentation.

@hobbestigrou hobbestigrou force-pushed the hobbestigrou:fix_unquote_data branch from 2334552 to 2f21758 Jul 17, 2019

Add new test.
Add test for the both functions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.