pychecker stories/feedback?
Toshio Kuratomi
a.badger at gmail.com
Tue Apr 29 15:48:45 UTC 2008
David Kovalsky wrote:
> On Fri, 25 Apr 2008 13:10:18 +0000
>
> I've been using pylint for a while and I must say it's pretty useful.
> It takes a while though to tune some of the tests - like
> * every variable has to be at least 3 chars (except for i when
> iterating), so often used 'id' won't pass as well as common for l in
> lines, for k,v in dict.iteritems() and such
>
id is also a builtin::
id(...)
id(object) -> integer
Return the identity of an object. This is guaranteed to be unique
among simultaneously existing objects. (Hint: it's the object's
memory address.)
> * pylint complains about nonexisting properties if you override the
> __getattr__ method.
>
> * in default * and ** magic is now allowed (from foo import *, def
> bar(*args, **kwargs), which is sometimes very useful
>
> But it has pretty good documentation, commented config file and you can
> tune the checks using comments in the .py files themselves
> to disable a check for a file or even a block of code as simply as for
> example '# pylint: disable-msg=C0103' to disable warning about module
> variable in lowercase.
>
It is also supposed to be able to turn tests on and off at the same
level but that is broken in the current release. (Upstream says they
have a fix in for the next release).
> As I mentioned, you really have to take the time to configure it to
> your standart. As some people prefer to use CamelCase, some
> use_underline. After that is helps you keep the same standart
> throughout the whole project. And writing your own tests (plugins) is
> easy and fun :)
>
pylint --generate-rcfile is a useful option to start your customization
with.
-Toshio
More information about the Fedora-python-devel-list
mailing list