Closed MrSeccubus closed 1 month ago
There's nothing converted there, in Python (like in C) "foo" "bar" is a single implicitly concatenated string.
The behavior comes from pprint which is what we use for formatting output, but making this nicer is #243 which you're of course welcome to chime in on.
It is not just about making it "nicer" the current output is ,because of this behaviour of pprint unusable.
The other thinng that you could consider to make the output of pprint usefull is to set width=sys.maxsize
as per this stackoverflow article: https://stackoverflow.com/questions/31485402/can-i-make-pprint-in-python3-not-split-strings-like-in-python2
Again this is not just a cosmetic issue, this is also a usability issue.
When I use this code:
To validate property
$.containers.cna
of this file https://github.com/DIVD-NL/cna-bot/blob/main/error-cves/cve_5.1/refs/01.missing/CVE-1999-0012.json against this schema: https://github.com/RedHatProductSecurity/cvelib/blob/master/cvelib/schemas/CVE_JSON_cnaPublishedContainer_5.1.0.jsonThis is displayed:
Somehow comment gets converted to an array of three where in the schema is it just a single string (https://github.com/RedHatProductSecurity/cvelib/blob/master/cvelib/schemas/CVE_JSON_cnaPublishedContainer_5.1.0.json#L2)
And the property "description" is converted to an array of words instead of a string (https://github.com/RedHatProductSecurity/cvelib/blob/master/cvelib/schemas/CVE_JSON_cnaPublishedContainer_5.1.0.json#L24)
This makes my output very very urgly.