Skip to content

Commit

Permalink
Rename function
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinHammarstedt committed Aug 9, 2022
1 parent 219c146 commit 1863ada
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions sparv/core/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,11 @@ def increase_indent(self, flow=False, indentless=False):
return super(IndentDumper, self).increase_indent(flow)

# Add custom string representer for prettier multiline strings
def str_presenter(dumper, data):
if len(data.splitlines()) > 1: # check for multiline string
return dumper.represent_scalar('tag:yaml.org,2002:str', data, style='|')
return dumper.represent_scalar('tag:yaml.org,2002:str', data)
yaml.add_representer(str, str_presenter)
def str_representer(dumper, data):
if len(data.splitlines()) > 1: # Check for multiline string
return dumper.represent_scalar("tag:yaml.org,2002:str", data, style="|")
return dumper.represent_scalar("tag:yaml.org,2002:str", data)
yaml.add_representer(str, str_representer)

if resolve_alias:
# Resolve aliases and replace them with their anchors' contents
Expand Down

0 comments on commit 1863ada

Please sign in to comment.