con2 / emrichen

A Template engine for YAML & JSON
MIT License
107 stars 11 forks source link

Vendor a simplified pyaml as emrichen.pretty_yaml #71

Closed akx closed 1 year ago

akx commented 1 year ago

It's a small module, and for projects that only need part of its functionality, I'd recommend copy-pasting that in, instead of adding janky dependency.

https://github.com/mk-fg/pretty-yaml/blob/b848a521b8fa337040262fda46dfe53c44c76327/README.rst

So this does just that, simplifying and py3-ifying pyaml~=21.10 and vendoring it in.

A quick unofficial snapshot-y test seems to say that e.g. the kubernetes example is formatted the same c.f. master. For the future, I wonder if we should have some snapshot tests (e.g. https://tophat.github.io/syrupy/)?

akx commented 1 year ago

Okay, a quick unofficial snapshot-y test seems to say that e.g. the kubernetes example is formatted the same c.f. master.