I'm trying to write PEP-8 compliant code for a domestic project and I have a line with an f-string that is more than 80 characters long
– the solid thin line near the dot at self.text
is the 80 char mark.
I'm trying to split it into different lines in the most pythonic way but the only aswer that actually works is an error for my linter
Working code:
def __str__(self):
return f'{self.date} - {self.time},\nTags:' + \
f' {self.tags},\nText: {self.text}'
Output:
2017-08-30 - 17:58:08.307055,
Tags: test tag,
Text: test text
The linter thinks that I'm not respecting E122 from PEP-8, is there a way to get the string right and the code compliant?