fix: expose ruamel_typ and ruamel_attrs in to_yaml method#311
Closed
highoncomputers wants to merge 2 commits into
Closed
fix: expose ruamel_typ and ruamel_attrs in to_yaml method#311highoncomputers wants to merge 2 commits into
highoncomputers wants to merge 2 commits into
Conversation
The _to_yaml function already supports ruamel_typ and ruamel_attrs parameters, but Box.to_yaml() didn't expose them, making it impossible for users to configure ruamel.yaml behavior (e.g., increasing width to prevent unwanted line wrapping of long values). This change passes these parameters through. Fixes #307
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The
_to_yamlfunction already supportsruamel_typandruamel_attrsparameters for configuring ruamel.yaml's parser behavior, butBox.to_yaml()didn't expose these. This made it impossible for users to customize ruamel.yaml settings (e.g., increasing thewidthto prevent unwanted line wrapping of long scalar values).Changes
box/box.py: Addedruamel_typandruamel_attrsparameters toto_yaml()and passed them through to_to_yaml()Type of Change
Related Issue
Fixes #307