Skip to content

Set default_flow_style for yaml jinja filter - #3051

Merged
Kami merged 1 commit into
masterfrom
fix/jinja_filter_flow_style
Nov 28, 2016
Merged

Set default_flow_style for yaml jinja filter#3051
Kami merged 1 commit into
masterfrom
fix/jinja_filter_flow_style

Conversation

@enykeev

@enykeevenykeev commented Nov 25, 2016

Copy link
Copy Markdown
Member

It is my impression that this filter is mainly used to produce readable representation of the object. Unless default_flow_style is strictly defined, yaml dumper would pick the one it seem appropriate producing quite different formatting for pretty similar kind of input.

Flow style

{author: st2-dev, description: StackStorm pack management, email: info@stackstorm.com,
name: st2, version: 0.1.2}

vs block style

author: st2-dev
description: st2 content pack containing github integrations
email: info@stackstorm.com
keywords:
- github
- git
- scm
name: github
version: 0.4.0

@emedvedev

Copy link
Copy Markdown
Contributor

LGTM

@codecov-io

codecov-io commented Nov 25, 2016

Copy link
Copy Markdown

Current coverage is 77.15% (diff: 100%)

Merging #3051 into master will increase coverage by 0.25%

@@ master #3051 diff @@
==========================================
Files 430 430 Lines 21997 21997 Methods 0 0 Messages 0 0 Branches 0 0 ==========================================
+ Hits 16914 16970 +56 + Misses 5083 5027 -56 
Partials 0 0 
Diff CoverageFile Path
•••••••••• 100%st2common/st2common/jinja/filters/data.py

Powered by Codecov. Last update 02e3c95...cbd6097

@arm4b

Copy link
Copy Markdown
Member

@Kami

Kami commented Nov 25, 2016

Copy link
Copy Markdown
Member

Good catch - LGTM, 👍

(we already do this in some places, but yeah it's a good idea to do it everywhere and be consistent)

@Kami
Kami merged commit 7d0d95c into masterNov 28, 2016
@Kami
Kami deleted the fix/jinja_filter_flow_style branch November 28, 2016 15:26
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@enykeev@emedvedev@codecov-io@arm4b@Kami