Open Bengt opened 2 years ago
My current workaround is to manually not check in these faulty lines. This is however cumbersome and error-prone.
On a ~ 1.3k line code base, I get this error 33 times, so it is quite widespread for me.
According to the documentation, there should be no trailing comma in the last line of a hanging-indent multi line import:
from third_party import \
lib1, lib2, lib3, \
lib4, lib5, lib6
Source: https://pycqa.github.io/isort/docs/configuration/multi_line_output_modes.html#2-hanging-indent
So, I would have expected my imports to remain unchanged like so:
from vr_backend.shims.tensorboard_shim.tensorboard_writer import \
TensorBoardWriter
Not using --profile hug
seems to avoid the problem as well.
Basically this config results in this behaviour:
include_trailing_comma = true
multi_line_output = 2
I have imports like so:
I run isort on that file like so:
I get superfluous commas in the imports:
This is not valid Python syntax and thus even causes errors when trying to execute the file: