Open bastisawesome opened 1 year ago
The biggest benefit to this change is that it makes it possible for the SQL queries to be formatted without impacting the generated code. Though, this probably could have and should have been done this way from the start using multi-line strings.
That benefit does not exist for non-SQL query strings, but this issue would still make it clearer what is happening and produce slightly cleaner code.
That title is probably confusing, but it should get the point across.
In several parts of the codebase there are strings that would extend beyond the 80 character limit. To fix them, often some hacky, hard-to-read workarounds are used for string-concatenation and/or continuation. Replace these hacks with slightly-more readable code that utilises
str.strip
and thetextwrap
built-in library.An example from database.py: old:
new:
Not 100% certain whether or not this is more readable, but it definitely seems less hacky than floating parenthesis. Will keep this under review until either someone else comments/makes a pull request, or the time comes for me to begin work on this issue.