Tag Archives: PEP8: continuation line over-indented for visual indent

Pep8: continuation line over indented for visual indent appears when wrapping Python code

Website content quality is poor, distribution efficiency is too low how to do?Huawei engineers offer 5 unique skills>>>

In pycharm editor, when a line of code is too long and needs to wrap, use the symbol connection, such as:

if first_index \
   < 0 or second_index \
   > self._number_of_plates - 1:

However, the editor will prompt: pep8: continuation line over indented for visual indent, you can use () to package the code in it, and you don’t need the symbol, such as:

if (first_index < 0 or
    second_index > self._number_of_plates - 1):