[Eric] Re: pylint

Vicent Mas uvep at ono.com
Tue Apr 10 17:11:01 BST 2007


El Tuesday, 10 de April de 2007 13:41 Detlev Offenbach escribió:
> On Dienstag, 10. April 2007, Vicent Mas wrote:
> > Hi,
> >
> > I'm trying to use the pylint feature of eric4 in one of my python
> > projects with no luck. pylint allways tries to import the package
> > from the system site-packages directory. How can I pass to pylint
> > the 'working directory' where the project to be checked lives?
> >
> > TIA.
> >
> > Version Numbers
> > Python 2.4.4
> > Qt 4.2.2
> > PyQt 4.1.1
> > sip 4.5.2
> > QScintilla 2-snapshot-20070318
> > Eric4 4.0-snapshot-20070402
> > Bicycle Repair Man CVS-20041120
>
> Hi,
>
> the pylint process is started in the directory, where the project
> lives, with the project's main script as the module to be checked. If
> that is not true in your case, I'd like you to check, what gets
> passed to the pylint process (Checks/PyLint/PyLintExecDialog,
> start(...)).
>
> Regards,
> Detlev

Hi,

my project directory is /home/vmas/my_project and the project main 
script is /home/vmas/my_project/scripts/main_script.
The arguments passed to the start method are:

args: 
pylint, --rcfile=/home/vmas/my_project/.pylintrc, --output-format=text, --enable-checker=basic...
fn: /home/vmas/my_project
reportFile: None
ppath: /home/vmas/my_project

pylint returns the following result:

************* Module my_project
F:  1: logilab.astng._exceptions.ASTNGBuildingException: Unable to load 
module my_project (No module named my_project)


Report
======
0 statements analysed.

Statistics by type
------------------

+---------+-------+-----------+-----------+------------+---------+
|type     |number |old number |difference |%documented |%badname |
+=========+=======+===========+===========+============+=========+
|module   |0      |0          |=          |0.00        |0.00     |
+---------+-------+-----------+-----------+------------+---------+
|class    |0      |0          |=          |0.00        |0.00     |
+---------+-------+-----------+-----------+------------+---------+
|method   |0      |0          |=          |0.00        |0.00     |
+---------+-------+-----------+-----------+------------+---------+
|function |0      |0          |=          |0.00        |0.00     |
+---------+-------+-----------+-----------+------------+---------+



Messages by category
--------------------

+-----------+-------+---------+-----------+
|type       |number |previous |difference |
+===========+=======+=========+===========+
|convention |0      |0        |=          |
+-----------+-------+---------+-----------+
|refactor   |0      |0        |=          |
+-----------+-------+---------+-----------+
|warning    |0      |0        |=          |
+-----------+-------+---------+-----------+
|error      |0      |0        |=          |
+-----------+-------+---------+-----------+



Messages
--------

+-----------+-----------+
|message id |occurences |
+===========+===========+
|F0002      |1          |
+-----------+-----------+



Hope it helps.

Vicent,

-- 
::

	Share what you know, learn what you don't




More information about the Eric mailing list