Skip to content

Possibly strange over-indentation

I'm using python-mode.el 6.2.3 with emacs 24.5.1 and found multi-line strings are over-indented.

#!/usr/env/bin python

print('test'
          'string'
          'here')

Flake8 for example complains those lines are over-indented (error code: E127)

I think those lines should be formatted as follows:

#!/usr/env/bin python

print('test'
      'string'
      'here')

py-count-indentation returns 10 on the line with 'string'.

I could'nt figure out whether some flag can suppress the behavior that lets py-count-indentation return 7 instead.