Closed LorenzoMartini closed 7 months ago
Type
Description
Failing on unrelated stuff due to develop of this repo being broken
Issue that's currently blocking this is fixed in https://github.com/palantir/conjure-python/pull/778
👍
Released 4.10.0
Before this PR
The
UnionSnippet.emit(PythonPoetWriter poetWriter)
method parses conjure class definitions into python code bindings. As part of the process, it extractsdocs
components from the apis and wraps them in the python docstring format, which is the triple-quote"""
.If a docstring terminates with a
"
(which it shouldn't), that would cause a set of 4 consecutives"
, which is invalid python and that will cause errors when reading from these files. For example, if I define my conjure api likethis will cause the following error when reading the generated conjure python bindings:
After this PR
Fix up UnionSnippet to have newlines wrapping the content and extract the doc-writing into a separate method being reused across all cases.
==COMMIT_MSG== Wrap indent docstring in newlines for UnionSnippet ==COMMIT_MSG==
Possible downsides?
The pythonic way of doing docstrings has them in the format
but we currently do
I will change that in a separate PR, this is a more time-sensitive fix.