You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When pylint calculates the correct indentation of a line following a multi-line string it uses the last non-space character in the multi-line string rather than basing it off of the code preceding the string. In the following example, I would expect the indentation of some and string to be four spaces, because that's the correct indentation based off of the _ = """Dear Guido, line. But pylint wants it to be four spaces beyond the start of Bill""", which makes the code less readable IMO.
Steps to reproduce
1. cat > /tmp/z.py
_ = """Dear Guido,
Python is pretty awesome, but there's something annoying with the linter.
Sincerely,
Bill""".format(
some=variable_with_a_long_name,
strings=another_variable_with_a_really_long_name)
2. pylint /tmp/z.py
When
pylint
calculates the correct indentation of a line following a multi-line string it uses the last non-space character in the multi-line string rather than basing it off of the code preceding the string. In the following example, I would expect the indentation ofsome
andstring
to be four spaces, because that's the correct indentation based off of the_ = """Dear Guido,
line. Butpylint
wants it to be four spaces beyond the start ofBill"""
, which makes the code less readable IMO.Steps to reproduce
Current behavior
Outputs the following message:
Expected behavior
This should have been acceptable.
pylint --version output
The text was updated successfully, but these errors were encountered: