strange formatting

i cant figure out why my python is getting formatted wierd ...

example:

i have something like:

a = function([a,b,c])

and it is formatted like this:

a = function([
   a,b,
c])

the problem is this is not valid python, you need backslash at the end of the line to be valid ...

I turned off wrapping long lines, and i cannot seem to figure out what is causing this ... what can i do?
3 comments
Comment actions Permalink
real example after doing reformat code: (not valid python)

net += "L_1_" + curComp[
      "partRef"] + " " + K1 + " " + K2 + " " +
valTmp[0] + "\n"

??
0
Comment actions Permalink
What is the right margin specified in the code style settings? Also, could you please attach a sample file (before reformat) on which the problem can be reproduced?

Your original example is valid Python - when the line break occurs inside brackets or parentheses, the backslash character is not needed.
0
Comment actions Permalink
well how it is formatting my python is not accepting it .. i will give better example soon
0

Please sign in to leave a comment.