For example, if I have
>>> name = f"{os.path.splitext(os.path.basename('/some/long/path/I/donot/need/to/some/config.bs'))[0]}.yaml"
'config.yaml'
Because there's very little actual text, there's no good place prior to 79 characters to break the line. It appears you cannot do this:
name = f"{os.path.splitext(os.path.basename(
'/some/long/path/I/donot/need/to/some/config.bs'))[0]}.yaml"
>>> f"{os.path.splitext(os.path.basename(
File "<stdin>", line 1
f"{os.path.splitext(os.path.basename(
^
SyntaxError: EOL while scanning string literal
The only thing I've been able to do is split up the command, like:
>>> fname = '/some/long/path/I/donot/need/to/some/config.bs'
>>> tempname = os.path.splitext(os.path.basename(
... fname))[0]
>>> name = f'{tempname}.yaml'
>>> name
'config.yaml'
Is there any other option to split the f-string?