#572 Bad Indentation warning in multiline strings

1.3.9
closed-fixed
nobody
None
5
2008-01-12
2007-09-13
No

I get a Bad Indentation Warning (since upgrading to 1.3.9) in multiline strings:

e.g. ["." is a placeholder for space (" ")]

def foo():
....string = """bla
code()
..string ident
..string ident"""

The indentation check should ignore strings, in my opinion.

Occurs since upgrading from 1.3.8 to 1.3.9
OS: Windows XP
Eclipse 3.3.0
PyDev and PyDev Extensions installed.

Discussion

  • Heikki Toivonen

    Heikki Toivonen - 2007-09-18

    Logged In: YES
    user_id=972898
    Originator: NO

    I am seeing this too on Ubuntu Dapper Drake, Eclipse 3.2.2. I have both PyDev and PyDev Extensions installed. Drives me nuts ;)

     
  • Hannes Mueller

    Hannes Mueller - 2007-11-06

    Logged In: YES
    user_id=693100
    Originator: YES

    still present in 1.3.10 :(

     
  • Hannes Mueller

    Hannes Mueller - 2008-01-02

    Logged In: YES
    user_id=693100
    Originator: YES

    Additionally, there is a warning from the indentation check for lines that only contain comments. Please remove that also.

    e.g(indenting spaces replaced by "_":
    import_type = "SOME_TYPE" # some long comment
    __________________________# second line of comment

     
  • Fabio Zadrozny

    Fabio Zadrozny - 2008-01-12
    • status: open --> closed-fixed
     
  • Fabio Zadrozny

    Fabio Zadrozny - 2008-01-12

    Logged In: YES
    user_id=617340
    Originator: NO

    Fixed for 1.3.11

    Note that only happened with """ (double quotes) and not with ''' (single quotes)