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
Changed behaviour between 2.1.1 and 2.2 in dictionary variables #1954
Comments
It seems that using "" instead of [] is accepted.
I can't read this in the docs... |
It is returning False on this condition
where If you modify This is new logic added 3 months ago in 6badb2e |
I set the possible values in choice variable, but when using dictionary variables I'm free to use whatever I want "The dictionary values can, themselves, be other dictionaries and lists - the data structure can be as deep as you need." My workaround was to use an empty string as default and it seems to work, at least when using it from python in a non-interactive mode. |
I have a template that has this
cookiecutter.json
:I'm using cookiecutter from python scripts and send values as
extra_context
as:It worked as expected in 2.1.1 and stopped working in 2.2+
the error I get is:
I'm working in Linux with python3.7, to 3.10
It seems to me that cookiecutter wrongly interprets the index in the value of the dictionary variable as a choice list, that is not.
If I understand correctly the docs "The dictionary values can, themselves, be other dictionaries and lists - the data structure can be as deep as you need.", it should not be interpreted as a list.
Please let me know if I'm wrong and in fact what I want to obtain should be done differently.
The text was updated successfully, but these errors were encountered: