Menu

#384 Code formatter and negative numbers

open
nobody
None
5
2009-09-23
2009-09-23
No

The issue is with negative numbers if Auto-Format is on, and "use space before and after operators" is selected.

This has already been addressed in 2682974, but still does not seem to work in some cases.

E.g., while in the line "a = -1" no blank is inserted before "1", in the line "return -1" the blank is still inserted, i.e. I get "return - 1".

Discussion

  • Anonymous

    Anonymous - 2012-12-05

    Same problem here.

    It formats dictionaries badly:

    {'test': -1} goes to {'test':-1}

    as well as keywords badly:

    enumerate([1, 2, 3], start=-6) goes to enumerate([1, 2, 3], start= -6)

     
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.