Closed gromdimon closed 3 months ago
It looks like some 'label' lines are now too long. Although Black and Flake8 do not raise any issues, this definitely doesn't follow conventions. There are multiple ways to solve this problem: reformatting the string using parentheses (), using the '+' syntax, adding a helper method, or introducing some temporary variables before appending the link.
The question now is: how should I address this issue?
It looks like some 'label' lines are now too long. Although Black and Flake8 do not raise any issues, this definitely doesn't follow conventions. There are multiple ways to solve this problem: reformatting the string using parentheses (), using the '+' syntax, adding a helper method, or introducing some temporary variables before appending the link.
The question now is: how should I address this issue?
This is a good point. You have "wrapped" the code inside the format string and strings are exempt from line length formatting in black. It is possible to do the following:
'label': f'Create '
'{get_display_name(PROJECT_TYPE_PROJECT, title=True)}',
That reduces line length and is accepted by black. Probably the best way unless you want to use the old style format()
or get the title into a variable before inserting it into the string.
Issue: #1421