File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -399,7 +399,7 @@ def block(strings: Optional[Strings]) -> str:
399399 Given a collection of strings, return a string with each item on its own line,
400400 wrapped in an indented "{ }" block.
401401 """
402- return "{\n " + indent (join (strings , "\n " )) + "\n }" if strings else ""
402+ return wrap ( "{\n " , indent (join (strings , "\n " )), "\n }" )
403403
404404
405405def wrap (start : str , string : Optional [str ], end : str = "" ) -> str :
@@ -417,7 +417,7 @@ def indent(string: str) -> str:
417417 If the string is not None or empty, add two spaces at the beginning of every line
418418 inside the string.
419419 """
420- return " " + string .replace ("\n " , "\n " ) if string else string
420+ return wrap ( " " , string .replace ("\n " , "\n " ))
421421
422422
423423def is_multiline (string : str ) -> bool :
You can’t perform that action at this time.
0 commit comments