python: invalid code due to comments starting or ending with double quotes #1239
Labels
bug
good first issue
Not necessarily easy, but doesn't require deep quicktype knowledge
Python
Python Output
when generating python code, the generated syntax becomes invalid if there are comments (i.e.
"description"
fields in the JSON schema) that start or end with double quotesExample
for the JSON schema fragment:
the generated (invalid) python 3.7 code fragment is
Solution
the generator for python should check the first and last character of a documentation-comment (i.e. the
"description"
field value) -- and if this is the case, the emitted code should "escape" these characters (e.g. prepend/append a newline or space character)The text was updated successfully, but these errors were encountered: