Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add whitespace to generated code to allow line breaks
Some generated expressions, particularly those that contain only '*' and '/' operands, have no whitespace. In this case, the textwrap module may break the line in the middle of a symbol or mathematical expression if the line is long, resulting in code that cannot compile. This commit adds whitespace before and after the '*', '/' operands so that textwrap will have more options for inserting line breaks. The textwrap option 'break_long_words' is also set to True, allowing long lines in the event that no whitespace is present. This commit resolves pydy#263.
- Loading branch information
Showing
2 changed files
with
60 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters