Skip to content

Commit

Permalink
tweak docstring, more type annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
rocky committed Jan 7, 2023
1 parent a43fd5e commit 45c12c4
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions mathics/eval/makeboxes.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,25 +54,30 @@ def _boxed_string(string: str, **options):
return StyleBox(String(string), **options)


def eval_fullform_makeboxes(self, expr, evaluation, form=SymbolStandardForm):
def eval_fullform_makeboxes(
self, expr, evaluation: Evaluation, form=SymbolStandardForm
) -> Expression:
"""
This function takes the definitions provided by the evaluation
object, and produces a boxed form for expr.
Basically: MakeBoxes[expr // FullForm]
"""
# This is going to be reimplemented.
expr = Expression(SymbolFullForm, expr)
return Expression(SymbolMakeBoxes, expr, form).evaluate(evaluation)


def eval_makeboxes(self, expr, evaluation, form=SymbolStandardForm):
def eval_makeboxes(
self, expr, evaluation: Evaluation, form=SymbolStandardForm
) -> Expression:
"""
This function takes the definitions provided by the evaluation
object, and produces a boxed form for expr.
object, and produces a boxed fullform for expr.
Basically: MakeBoxes[expr // FullForm]
Basically: MakeBoxes[expr // form]
"""
# This is going to be reimplemented.
expr = Expression(SymbolFullForm, expr)
return Expression(SymbolMakeBoxes, expr, form).evaluate(evaluation)


Expand Down

0 comments on commit 45c12c4

Please sign in to comment.