aboutcode-org / aboutcode-org/saneyaml

Saneyaml load() and dump() does not preserve the same text

Aperta
#10 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
good first issue help wanted
Lingua principale
Python
Stelle
10
Fork
4
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Consider the following example:
```
text = """

This is the apache license text.

"""

import saneyaml

data = {"text": text}
yaml_string = saneyaml.dump(data, indent=4)
loaded_yaml = saneyaml.load(yaml_string)
assert text == loaded_yaml["text"]
```

And this fails with:
```
---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
Cell In[5], line 1
----> 1 assert text == loaded_yaml["text"]

AssertionError:
```

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.