Logical lines of code counter
Tim Leslie
tim.leslie at gmail.com
Tue Aug 24 06:03:20 EDT 2004
Hi Sylvain,
Since you're alive on this list, I thought I'd throw you a couple of questions:
1) Where should I best be asking pylint questions? The mailing list
looks a bit quite so I wasn't sure if I would get a reply.
2) Is there someway to specify a set of variables which won't throw
errors for being unused, eg _ when used as a dummy in a for/list comp.
3) Why does this trigger?
W0622 datacore.ns5 Ns5._parseHeaders 156 Redefining built-in '_'
The offending line is:
electrodes = [{} for _ in range(self.num_channels)]
Cheers
Tim
On Tue, 24 Aug 2004 10:34:16 +0200, Sylvain Thenault
<sylvain.thenault at nospam.logilab.fr> wrote:
>
>
> On Sun, 22 Aug 2004 23:43:25 -0400, Leif K-Brooks wrote:
>
> > Tim Leslie wrote:
> >> On Sun, 22 Aug 2004 21:44:17 -0400, Leif K-Brooks
> >> <eurleif at ecritters.biz> wrote:
> >>
> >>>I got bored with working on larger projects and wrote a little
> >>>script/module for counting logical (not physical) lines of Python code
> >>>in a file or directory.
> >> If you want something which can do this and so much more, have a look at
> >> pylint.
> >>
> >> http://www.logilab.org/projects/pylint
> >
> > Neat-looking tool, but not really usable for me. It counts physical lines,
> > not logical lines; it doesn't seem to have an option to recursively scan
> > all sub-directories and files in a directory; and it refuses to process a
> > file if some of the modules code wants to import aren't importable, which
> > is the case with mod_python code.
>
> pylint counts both physical lines and logical lines, but all collected
> values are not displayed in reports. You should easily add a new report to
> display some additional information if you need it. Well, it lacks some
> documentation but the code is quite clean and I would be happy to help.
>
> It's also possible to recursivly scan for all python modules in a
> given package ("pylint mypackage"). The problem with failing import is the
> most annoying one. I plan to fix it, one day ;)
>
> --
> Sylvain Thénault LOGILAB, Paris (France).
>
> http://www.logilab.com http://www.logilab.fr http://www.logilab.org
>
>
>
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
More information about the Python-list
mailing list