Skip to content

Commit

Permalink
Fixed wrap and initial indent not being properly disabled/set
Browse files Browse the repository at this point in the history
  • Loading branch information
evandrocoan committed Mar 29, 2020
1 parent 4c5e77b commit 822ea69
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion all/debug_tools/utilities.py
Expand Up @@ -618,8 +618,10 @@ def wrap_text(text, wrap=0, trim_tabs=None, trim_spaces=None, trim_lines=None,
if trim_spaces is not None or trim_plus is not None:
dedent_lines = textwrap.dedent( "\n".join( clean_lines ) )

if wrap:
if wrap or initial or indent:
clean_lines.clear()
if not wrap: wrap = 10**10
if not initial: initial = indent

for line in dedent_lines.split( '\n' ):
line = textwrap.fill( line, width=wrap, initial_indent=initial, subsequent_indent=indent )
Expand Down

0 comments on commit 822ea69

Please sign in to comment.