Menu

#398 Add autoformat option for spaces outside parentheses.

open
nobody
None
5
2009-11-11
2009-11-11
kgi
No

Hi there; thanks for PyDev!

I have a minor feature request.

In Pydev->Editor->Code Style->Code Formatter, there's an option called "Use space before and after parenthesis".

This option, however, is actually "Use space inside parenthesis"; in other words, it turns:

obj.callMethod(arg, arg, arg)

into:

obj.callMethod( arg, arg, arg )

However, I have a large codebase in which there is space *before* the opening parenthesis (and after the closing parenthesis).

In other words, like this:

obj.callMethod ( arg, arg, arg )

I'd love to use the autoformatting capabiltiy of pydev, but doing so would reformat lots of existing code, so it would be absolutely great to be able to preserve this if possible.

Note that two exceptions to this are in class/def declarations and zero-argument method invocations, so, for example:

object.doStuff()

instead of

object.doStuff ( )

and:

def doStuff ( foo ):

instead of

def doStuff ( foo ) :

Is this something that could be added to PyDev?

Thanks!

kgi

Discussion

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.