The following is the output from Black for a line in the Addon Manager, and is legal, valid Python:
Code: Select all
translate(
"AddonsInstaller",
"Unable to read data from GitHub: check your internet connection and proxy settings and try again.",
)
Note that I've only corrected it for translate(), not for tr(), which presumably suffers from the same issue. I also only corrected it for cases where there are two arguments, and no comment string. The bug also exists when there is a comment string but no pluralization info, and for when all four arguments are present along with a trailing comma. I don't see any instances of that in our codebase, so I have not bothered to address it. If someone at Qt decides to fix the bug hopefully they will handle all those cases.