better-comments
better-comments copied to clipboard
Extension highlights a line that is not a comment when unpacking a list in python
In python, when calling a function, with all the arguments in a new line, starting with the unpacking of a list, the extension highlights all the line due to using an *, even do it is not a comment.
Example code:
res = foo(
*[1, 2, 3]
)
I could not reproduce this using your example code unless the file didn't have an extension. The better-comments extension determines the comment character based on the file extension, so you can rename your file with .py Alternatively try adding this in your settings.json(or removing it if already declared):
"better-comments.highlightPlainText": true,
This will turn off comments in plain text files and will likely fix your problem
The file did have an extension .py. I've tested this again today and it works fine. Maybe it's been solved with an update?