I ran across the following comment while studying coverage.py::

    # pylint: disable-msg=W0622

Eureka!  At last I had found the way to disable pylint messages inside
source files.  This is documented, but it takes some doing to find it,
even if you know what you are looking for. In fact, "disable-msg" is
now deprecated.  The recommended way is now::

    # pylint: disable=W0622

The "#pylint: disable=" construct applies to the smallest enclosing
statements, so sometimes you will see the comment inside an "if 1:"
statement.  For example::

    if 1:
        # pylint: disable=W0108
        # W0108: LeoNode.<lambda>: Lambda may not be necessary
        v = property(lambda self: eval_node(self), __set_val,
            doc = "Node evaluated value")

As a happy side effect, pylint-leo.py, the script that I use to drive
pylint, is now much simpler.

Edward

P.S.  As noted in pylint-leo.py.run, I changed lint.py:Run.__init__ so
pylint can handle more than one file at a time.  You have to make this
change if you are going to use pylint-leo.py as I use it.

P.P.S.  Why would I be studying coverage.py, you ask?  That's the
topic of the next post.

EKR

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en.

Reply via email to