[Eric] Indentation check not working fine?

Geert Eric4 geert.eric4 at gmail.com
Wed Dec 31 13:39:07 GMT 2008


Hi,

I'm taking my first steps in using eric4 to create and debug Python 
applications. 
Since I'm also quite new to Python, I'm trying to write the (important) 
indents as much as possible correct immediately.  However, nobody's 
perfect, that's why I find it very good that eric4 has a tool/option to 
check the indentations (when you're editing a Python file, right-click 
and select "Check -> indentations...").

However, I tried out the tool with the following small piece of code:

import wx

class MainWindow(wx.Frame):
    """ We simply derive a new class of Frame. """
    def __init__(self, parent, id, title):
wx.Frame.__init__(self, parent, id, title, size=(200,100))         <=== 
THIS LINE HAS A WRONG INDENT
        self.control = wx.TextCtrl(self, 1, style=wx.TE_MULTILINE)
        self.Show(True)

app = wx.PySimpleApp()
frame=MainWindow(None, wx.ID_ANY, 'Small editor')
app.MainLoop()

As one can see, after the "def __init__()" line, there's a ":", so the 
next line *must* be indented.  I deliberately started the new line at 
the leftmost position and ran the indentation check.

To my surprise, the check passed, while I would have expected to see a 
failure here.

In the editor itself, on the other hand, checking this looks good 
because I saw the "red bug" on the left for as long as the indentation 
was not correct.
Then I saw that "Check -> Syntax..." was giving me the error, as long as 
any of the indentations were incorrect.

What's the difference between "Check -> Indentations..." and "Check -> 
Syntax..." with respect to indentations?  This difference is not clear 
to me...

-- 
*Best rgds,

--Geert
____________________________________

     In commemoration of my beloved Parents...
        http://ouders.gevawebsolutions.com
____________________________________*


More information about the Eric mailing list