Skip to content

Commit

Permalink
black
Browse files Browse the repository at this point in the history
  • Loading branch information
rocky committed Dec 10, 2022
1 parent b5c3657 commit 9d74f87
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion mathicsscript/termshell.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,11 @@ def print_result(
print(list(lex(out_str, mma_lexer)))
if use_highlight:
out_str = highlight(out_str, mma_lexer, self.terminal_formatter)
form = "" if not hasattr(result, "form") or result.form is None else f"//{result.form}"
form = (
""
if not hasattr(result, "form") or result.form is None
else f"//{result.form}"
)
output = self.to_output(out_str, form)
if output_style == "text" or not prompt:
print(output)
Expand Down
6 changes: 5 additions & 1 deletion mathicsscript/termshell_prompt.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,11 @@ def print_result(
if output_style == "text" or not prompt:
print(output)
elif self.session:
form = "" if not hasattr(result, "form") or result.form is None else f"//{result.form}"
form = (
""
if not hasattr(result, "form") or result.form is None
else f"//{result.form}"
)
print_formatted_text(self.get_out_prompt(form=form), end="")
print(output + "\n")
else:
Expand Down

0 comments on commit 9d74f87

Please sign in to comment.