Closed n-gao closed 2 years ago
Is there any plan on merging this? :)
Absolutely! Once I find the time to test it... 😅
This issue is quite severe. It essentially blocks you from using boolean variables or 2d arrays in your yaml files. It would be great if this could be merged or #51 be reversed.
@n-gao does this fix #60? If yes you can close that issue and refer to this.
Reference issue
This is a follow-up PR to #51.
51 uses
json.dumps
which works reasonably fine in most scenarios and avoids a long range of single quotes in the outputted commands. However, JSON and Python code is not a 1:1 matching, e.g., boolean literals start with lower case in JSON (true/false) but with upper case in Python (True/False). This causes any parameter containing a boolean value to be returned as string byeval
.What does this implement/fix?
This PR contains two fixes:
json.dumps
byrepr
to have a valid Python representation of the objectnames.tostring()
which got removed in Python 3.9 bynames.tobytes()
innetwork.py
(this is simply a maintenance update without any functional impact)Additional information
seml print-command
While the commands are certainly not beautiful they are at least correct.