pydev incorrectly formats multi-line keyword arguments while code formatting

Go To


Pydev is incorrectly formatting multi line keyword arguments to a function, and putting spaces even though the preferences is keyword arguments without spaces, in the special case when its a keyword argument following a regular argument.

Am I missing something here? and should possible bug reports stay on stack overflow? Fabio?


funktion_call(arg1, kwarg1 = abc)

is correctly formatted to (with the appropriate pydev settings) to:

funktion_call(arg1, kwarg1=abc)

However, if the function call goes multiline:


then it incorrectly treats the spaces as if it was an assignment and formats to:

                  kwarg1 = abc)
2012-04-04 04:23
by eskhool


Actually, I can't reproduce it in the latest PyDev version (which version are you using?)

If you can reproduce it reliably, please create a bug report in the PyDev sf tracker with the example to reproduce it.

Regarding where to report things, if you're in doubt if it's a bug or not, here is a good place to ask, but if you're certain it's a bug, it should be reported directly to the PyDev sf tracker.

2012-04-10 16:21
by Fabio Zadrozny
Fabio, I'm using Pydev (bundled with Aptana). I don't think there is a way of just updating Pydev? if you have the Aptana plugin installed as well - eskhool 2012-05-10 08:23
I can definitely reproduce the problem with this code can paste it as it into a .py file in eclipse..if you put a space after the keyword variable b by mistake, then it'll space it around the = and you can't get rid of it.

inline ` def function(a, b=None): pass

function(a=1231, b = 'asrtasr') - eskhool 2012-05-10 08:26

This bug is already reported in the Pydev SF tracker as ID: 3460899eskhool 2012-05-10 08:37
Should be fixed for 2.6.0. Please grab the nightly build to test it - Fabio Zadrozny 2012-05-10 10:54
I've 2.7.1 and it isn't fixe - Uri 2013-04-10 08:52
Well, with that exact same case I can't really reproduce it... so, after the funding at goes through, please report that as a bug (in the tracker that'll be created -- so, please buffer the request for now until the tracker is up) - Fabio Zadrozny 2013-04-11 11:14