Home Download Buy Blog Forum Support

indent_subsequent_lines behavior in Python

indent_subsequent_lines behavior in Python

Postby rsmith31415 on Wed Nov 09, 2011 4:52 am

A little problem here. Hopefully, someone will be able to help ;)

After enabling "indent_subsequent_lines" in the Syntax specific settings for Python, I get the following:

Code: Select all
for name, field in form.fields.iteritems():
    value = form.fields[name]
        if not value and form.fields[name].required:
            self.assertFormError(response, "form", name, [error_msg])


which, I think, is not desirable. Instead, if a set indent_subsequent_lines to false, I get:

Code: Select all
       for name, field in form.fields.iteritems():
       value = form.fields[name]
       if not value and form.fields[name].required:
       self.assertFormError(response, "form", name,
[error_msg])


although that depends on wrap_width (mine is set to 60).

Obviously, the intended behavior should be:

Code: Select all
for name, field in form.fields.iteritems():
    value = form.fields[name]
    if not value and form.fields[name].required:
        self.assertFormError(response, "form", name,
        error_msg])


Is it possible to adjust the amount of indentation for that particular setting?

Thanks in advance.
rsmith31415
 
Posts: 1
Joined: Sun Nov 06, 2011 4:48 am

Return to Technical Support

Who is online

Users browsing this forum: Alexa [Bot], Clams, Exabot [Bot] and 9 guests