What would you like to be improved?
Currently each printing class contains a _format_code method. This is often empty. For Fortran it contains lots of fiddly logic to ensure lines are not too long.
Do you have any suggestions for improvement? (Optional)
Instead of forcing the inclusion of the _format_code method even if it is empty it should be optional (default does nothing).
Instead of relying on fiddly code implementations, we should first look for common formatting tools.
E.g. fprettify for Fortran, clang-format for C/C++, black for Python. Alternatively the choice of formatting could be handled via plugins (see #2611) to explicitly activate a chosen format.
Record
What would you like to be improved?
Currently each printing class contains a
_format_codemethod. This is often empty. For Fortran it contains lots of fiddly logic to ensure lines are not too long.Do you have any suggestions for improvement? (Optional)
Instead of forcing the inclusion of the
_format_codemethod even if it is empty it should be optional (default does nothing).Instead of relying on fiddly code implementations, we should first look for common formatting tools.
E.g. fprettify for Fortran, clang-format for C/C++, black for Python. Alternatively the choice of formatting could be handled via plugins (see #2611) to explicitly activate a chosen format.
Record