Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > [ANN] pylint-0.2

Reply
Thread Tools

[ANN] pylint-0.2

 
 
Alexandre Fayolle
Guest
Posts: n/a
 
      09-26-2003
Logilab has released pylint-0.2

What's new?
-----------

In addition to a large number of bug fixes, this release adds two new
checkers, for missing encoding declaration, and for FIXME comments. Zope
support was improved.

About Pylint
------------

Pylint is a lint-like tool for Python code. It performs almost all the
verifications that pychecker does, and additionally can perform some
stylistic verification and coding standard enforcements. The checked
code is assigned a mark based on the number and the severity of the
encountered problems. The previous mark of a given piece of code is
cached so that you can see if the code quality has improved since the
last check.

URLs
----

Homepage: http://www.logilab.org/projects/pylint
Download: ftp://ftp.logilab.org/pub/pylint/pylint-0.2.tar.gz


--
Alexandre Fayolle
LOGILAB, Paris (France).
http://www.logilab.com http://www.logilab.fr http://www.logilab.org
Développement logiciel avancé - Intelligence Artificielle - Formations

 
Reply With Quote
 
 
 
 
Mark Hahn
Guest
Posts: n/a
 
      09-27-2003

> Pylint is a lint-like tool for Python code


Does pylint only work for modules? When I tried to run it on my code file
(ezpicmailer.py) , it raised an exception:

No config file found, using default configuration
<snip>
Exception: Unable to find module for C:\photoedit\ezpicmailer in
<snip>

and then it gave a long list of modules in my sys.path. It seems to insist
that the argument I give it be a module in sys.path, not just an arbitrary
python code file.

------------------------------------------

"Alexandre Fayolle" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
Logilab has released pylint-0.2

What's new?
-----------

In addition to a large number of bug fixes, this release adds two new
checkers, for missing encoding declaration, and for FIXME comments. Zope
support was improved.

About Pylint
------------

Pylint is a lint-like tool for Python code. It performs almost all the
verifications that pychecker does, and additionally can perform some
stylistic verification and coding standard enforcements. The checked
code is assigned a mark based on the number and the severity of the
encountered problems. The previous mark of a given piece of code is
cached so that you can see if the code quality has improved since the
last check.

URLs
----

Homepage: http://www.logilab.org/projects/pylint
Download: ftp://ftp.logilab.org/pub/pylint/pylint-0.2.tar.gz


--
Alexandre Fayolle
LOGILAB, Paris (France).
http://www.logilab.com http://www.logilab.fr http://www.logilab.org
Développement logiciel avancé - Intelligence Artificielle - Formations


 
Reply With Quote
 
 
 
 
Peter Milliken
Guest
Posts: n/a
 
      09-28-2003
I get the same error.

I tried to find documentation to see whether I was using Pylint correctly or
not but there isn't any. There seems to have been an attempt at providing
the possible command line options (python pylint.py --help) but I don't find
them particularly self-explanatory - so without documentation and the
apparent ability to "run out of the box", I guess I'll just have to give
this one a miss.

One nice thing that has happened is it has led me to the Optik package
(Option parsing). There is some nice documentation for this package - the
author(s) of Pylint could take some direction from this package if they
really want people to use Pylint (I have a personal hangup with people who
write good, useful packages and then don't bother documenting them - life is
just too short to read somebody else'e code to get around this deficiency
I get frustrated however when I think there is something that I could be
taking advantage of but something as simple as the lack of 0.5hr of
documentation stops me ).

In the meantime, I'll just have to watch this space

Peter


"Mark Hahn" <(E-Mail Removed)> wrote in message
news:EBkdb.3354$hp5.1305@fed1read04...
>
> > Pylint is a lint-like tool for Python code

>
> Does pylint only work for modules? When I tried to run it on my code file
> (ezpicmailer.py) , it raised an exception:
>
> No config file found, using default configuration
> <snip>
> Exception: Unable to find module for C:\photoedit\ezpicmailer in
> <snip>
>
> and then it gave a long list of modules in my sys.path. It seems to

insist
> that the argument I give it be a module in sys.path, not just an arbitrary
> python code file.
>
> ------------------------------------------
>
> "Alexandre Fayolle" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> Logilab has released pylint-0.2
>
> What's new?
> -----------
>
> In addition to a large number of bug fixes, this release adds two new
> checkers, for missing encoding declaration, and for FIXME comments. Zope
> support was improved.
>
> About Pylint
> ------------
>
> Pylint is a lint-like tool for Python code. It performs almost all the
> verifications that pychecker does, and additionally can perform some
> stylistic verification and coding standard enforcements. The checked
> code is assigned a mark based on the number and the severity of the
> encountered problems. The previous mark of a given piece of code is
> cached so that you can see if the code quality has improved since the
> last check.
>
> URLs
> ----
>
> Homepage: http://www.logilab.org/projects/pylint
> Download: ftp://ftp.logilab.org/pub/pylint/pylint-0.2.tar.gz
>
>
> --
> Alexandre Fayolle
> LOGILAB, Paris (France).
> http://www.logilab.com http://www.logilab.fr http://www.logilab.org
> Développement logiciel avancé - Intelligence Artificielle - Formations
>
>



 
Reply With Quote
 
Peter Hansen
Guest
Posts: n/a
 
      09-29-2003
Peter Milliken wrote:
>
> I get the same error.

[snip]
> (I have a personal hangup with people who
> write good, useful packages and then don't bother documenting them - life is
> just too short to read somebody else'e code to get around this deficiency
> I get frustrated however when I think there is something that I could be
> taking advantage of but something as simple as the lack of 0.5hr of
> documentation stops me ).


Maybe RTFM would help. See http://www.logilab.org/projects/pylint/documentation and
note the "dependancies" (sic) line which states "Pylint requires the
logilab-common(version >= 0.2.1) and the optik packages."

If you download the "Common libraries" from the links provided on that page,
I suspect it will work better.

Unfortunately, by posting the direct link to the download I suspect Alexandre
led people astray by implying that a single download might be enough to make
this work.

-Peter
 
Reply With Quote
 
John J. Lee
Guest
Posts: n/a
 
      09-29-2003
"Peter Milliken" <(E-Mail Removed)> writes:
[...]
> One nice thing that has happened is it has led me to the Optik package

[...]

Optik is now in 2.3 standard library, renamed as the optparse module.


John
 
Reply With Quote
 
Peter Milliken
Guest
Posts: n/a
 
      09-29-2003
Hi Peter,

No, I caught all of the dependencies that are required (common libraries and
optik - I think that is all that is required). I installed both of them
before attempting to run pylint and still received that error. Perhaps the
install is order dependent i.e. I installed pylint, then the "common
libraries" then the optik package.

Does Pylint work for you?

Peter

"Peter Hansen" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Peter Milliken wrote:
> >
> > I get the same error.

> [snip]
> > (I have a personal hangup with people who
> > write good, useful packages and then don't bother documenting them -

life is
> > just too short to read somebody else'e code to get around this

deficiency
> > I get frustrated however when I think there is something that I

could be
> > taking advantage of but something as simple as the lack of 0.5hr of
> > documentation stops me ).

>
> Maybe RTFM would help. See

http://www.logilab.org/projects/pylint/documentation and
> note the "dependancies" (sic) line which states "Pylint requires the
> logilab-common(version >= 0.2.1) and the optik packages."
>
> If you download the "Common libraries" from the links provided on that

page,
> I suspect it will work better.
>
> Unfortunately, by posting the direct link to the download I suspect

Alexandre
> led people astray by implying that a single download might be enough to

make
> this work.
>
> -Peter



 
Reply With Quote
 
Mark Hahn
Guest
Posts: n/a
 
      09-30-2003
They not only feel no need to document, they also feel no need to follow ANN
threads they start.

"Peter Milliken" <(E-Mail Removed)> wrote in message
news:ToKdb.9$(E-Mail Removed)...
> I get the same error.
>
> I tried to find documentation to see whether I was using Pylint correctly

or
> not but there isn't any. There seems to have been an attempt at providing
> the possible command line options (python pylint.py --help) but I don't

find
> them particularly self-explanatory - so without documentation and the
> apparent ability to "run out of the box", I guess I'll just have to give
> this one a miss.
>
> One nice thing that has happened is it has led me to the Optik package
> (Option parsing). There is some nice documentation for this package - the
> author(s) of Pylint could take some direction from this package if they
> really want people to use Pylint (I have a personal hangup with people who
> write good, useful packages and then don't bother documenting them - life

is
> just too short to read somebody else'e code to get around this deficiency
> I get frustrated however when I think there is something that I could

be
> taking advantage of but something as simple as the lack of 0.5hr of
> documentation stops me ).
>
> In the meantime, I'll just have to watch this space
>
> Peter
>
>
> "Mark Hahn" <(E-Mail Removed)> wrote in message
> news:EBkdb.3354$hp5.1305@fed1read04...
> >
> > > Pylint is a lint-like tool for Python code

> >
> > Does pylint only work for modules? When I tried to run it on my code

file
> > (ezpicmailer.py) , it raised an exception:
> >
> > No config file found, using default configuration
> > <snip>
> > Exception: Unable to find module for C:\photoedit\ezpicmailer in
> > <snip>
> >
> > and then it gave a long list of modules in my sys.path. It seems to

> insist
> > that the argument I give it be a module in sys.path, not just an

arbitrary
> > python code file.
> >
> > ------------------------------------------
> >
> > "Alexandre Fayolle" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > Logilab has released pylint-0.2
> >
> > What's new?
> > -----------
> >
> > In addition to a large number of bug fixes, this release adds two new
> > checkers, for missing encoding declaration, and for FIXME comments. Zope
> > support was improved.
> >
> > About Pylint
> > ------------
> >
> > Pylint is a lint-like tool for Python code. It performs almost all the
> > verifications that pychecker does, and additionally can perform some
> > stylistic verification and coding standard enforcements. The checked
> > code is assigned a mark based on the number and the severity of the
> > encountered problems. The previous mark of a given piece of code is
> > cached so that you can see if the code quality has improved since the
> > last check.
> >
> > URLs
> > ----
> >
> > Homepage: http://www.logilab.org/projects/pylint
> > Download: ftp://ftp.logilab.org/pub/pylint/pylint-0.2.tar.gz
> >
> >
> > --
> > Alexandre Fayolle
> > LOGILAB, Paris (France).
> > http://www.logilab.com http://www.logilab.fr http://www.logilab.org
> > Développement logiciel avancé - Intelligence Artificielle - Formations
> >
> >

>
>



 
Reply With Quote
 
Sylvain =?iso-8859-1?q?Th=E9nault?=
Guest
Posts: n/a
 
      09-30-2003
"Mark Hahn" <(E-Mail Removed)> writes:

> They not only feel no need to document, they also feel no need to follow ANN
> threads they start.


Sorry, I don't have the time to follow c.l.py at the moment and that's
just today that I've been informed about this thread.

So, regarding the command line, pylint expects the name of a package
or module as argument. As a convenience, you can give to it a file
name if it's possible to guess a module name from the file's
path, using the python path. Some examples :

"pylint mymodule.py" should always works since the current working
directory is automatically added on top of the python path

"pylint directory/mymodule.py" will work if "directory" is a python
package (i.e. has an __init__.py file) or if "directory" is in the
python path.

"pylint /whatever/directory/mymodule.py" will work if either:
- "/whatever/directory" is in the python path
- your cwd is "/whatever/directory"
- "directory" is a python package and "/whatever" is in the python path
- "directory" is a python package and your cwd is "/whatever"
and so on...


Regarding the lack of documentation, we're pretty busy at this time at
logilab, but I hope we'll have the time to write some until the next
release... Anyway, any contribution would be welcome


Hope that helps,
regards
--
Sylvain Thénault LOGILAB, Paris (France).

http://www.logilab.com http://www.logilab.fr http://www.logilab.org
 
Reply With Quote
 
Peter Milliken
Guest
Posts: n/a
 
      09-30-2003
Sorry mate, but I am in the same directory of the Python file I am trying to
run through pylint and I get the same message originally posted by Mark
Hahn.

So something is wrong - perhaps you should verify that what is on the
web-site is actually working as you expect?

Here is the full error message from one of my runs:

roebourne#1(~/swimming)$ python
c:/Python22/Lib/site-packages/logilab/pylint/lint.py roll.py
No config file found, using default configuration
Traceback (most recent call last):
File "c:/Python22/Lib/site-packages/logilab/pylint/lint.py", line 529, in
?
Run(*sys.argv[1:])
File "c:/Python22/Lib/site-packages/logilab/pylint/lint.py", line 496, in
__init__
modname = '.'.join(modpath_from_file(modname))
File "c:\Python22\Lib\site-packages\logilab\common\modutils.py", line 70,
in modpath_from_file
raise Exception('Unable to find module for %s in %s' % (
Exception: Unable to find module for c:\usr\local\swimming\roll in
c:\usr\local\swimming,
c:/Python22/Lib/site-packages/logilab/pylint,
c:\Python22,
c:\Python22\DLLs,
c:\Python22\Lib,
c:\Python22\Lib\lib-tk,
c:\usr\local\swimming,
c:\Python22\lib\site-packages,
c:\usr\local\share\emacs\site-lisp\pymacs
[exited with 1]

Note that I am running Python 2.2.2.

Peter

"Sylvain "Thénault"" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> "Mark Hahn" <(E-Mail Removed)> writes:
>
> > They not only feel no need to document, they also feel no need to follow

ANN
> > threads they start.

>
> Sorry, I don't have the time to follow c.l.py at the moment and that's
> just today that I've been informed about this thread.
>
> So, regarding the command line, pylint expects the name of a package
> or module as argument. As a convenience, you can give to it a file
> name if it's possible to guess a module name from the file's
> path, using the python path. Some examples :
>
> "pylint mymodule.py" should always works since the current working
> directory is automatically added on top of the python path
>
> "pylint directory/mymodule.py" will work if "directory" is a python
> package (i.e. has an __init__.py file) or if "directory" is in the
> python path.
>
> "pylint /whatever/directory/mymodule.py" will work if either:
> - "/whatever/directory" is in the python path
> - your cwd is "/whatever/directory"
> - "directory" is a python package and "/whatever" is in the python path
> - "directory" is a python package and your cwd is "/whatever"
> and so on...
>
>
> Regarding the lack of documentation, we're pretty busy at this time at
> logilab, but I hope we'll have the time to write some until the next
> release... Anyway, any contribution would be welcome
>
>
> Hope that helps,
> regards
> --
> Sylvain Thénault LOGILAB, Paris (France).
>
> http://www.logilab.com http://www.logilab.fr http://www.logilab.org



 
Reply With Quote
 
Sylvain =?iso-8859-1?Q?Th=E9nault?=
Guest
Posts: n/a
 
      10-01-2003
On Wednesday 01 October à 07:42, Peter Milliken wrote:
> Sorry mate, but I am in the same directory of the Python file I am trying to
> run through pylint and I get the same message originally posted by Mark
> Hahn.
>
> So something is wrong - perhaps you should verify that what is on the
> web-site is actually working as you expect?


ok, that was actually a problem in the common library. I've just made a
new release which should fix this problem :

ftp://ftp.logilab.fr/pub/common/common-0.3.3.tar.gz

--
Sylvain Thénault LOGILAB, Paris (France).

http://www.logilab.com http://www.logilab.fr http://www.logilab.org


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




Advertisments