kapitan icon indicating copy to clipboard operation
kapitan copied to clipboard

Feature/fix yaml document seperator null

Open Moep90 opened this issue 2 years ago • 2 comments

Fixes issue #843

Proposed Changes

  • Introduced SafeDumper as proposed here
  • https://pyyaml.docsforge.com/master/api/yaml/representer/

Moep90 avatar Jul 06 '22 19:07 Moep90

Hey @Moep90 sorry for the delay.

I see the intention here, but I personally make use of null in YAML when setting values to None in Kadet and honestly think that's the correct, expected behavior.

However I understand why this could be useful, so maybe we can add this as a feature behind a flag?

ramaro avatar Aug 20 '22 12:08 ramaro

Hey @ramaro,

I'm working on this feature for the last hours and it seems like there is a problem with the yaml-representer. I introduced the feature as a flag but the representer is loaded before the program starts and the flags/ arguments are read just after that.

So replacing the none-type-representer at runtime won't work. I have thought of some constructor overloading for the PrettyDumper class, so that it can be instantiated with different parameters for different representers etc.

What do you suggest?

MatteoVoges avatar Sep 19 '22 12:09 MatteoVoges

fixed with #861

Moep90 avatar Oct 11 '22 07:10 Moep90