variables

Format Expression

Format a PyBaMM expression string using black.

Wraps the expression in a dummy assignment, runs black, then strips the assignment back off so the caller gets just the formatted expression.

Parameters

request : FormatExpressionRequest expression: Raw PyBaMM expression string

Returns

FormatExpressionResponse expression: Black-formatted expression string

post/variables/format-expression

Request body

expressionstring required

Response

Successful Response

expressionstring required

Changes

No recorded changes to this endpoint across all 1 revision of this API.