[Eric] Re: pylint
Detlev Offenbach
detlev at die-offenbachs.de
Wed Apr 11 17:51:57 BST 2007
On Dienstag, 10. April 2007, Vicent Mas wrote:
> El Tuesday, 10 de April de 2007 18:27 Detlev Offenbach escribió:
> > On Dienstag, 10. April 2007, Vicent Mas wrote:
> > > 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)
> >
> > Does your project directory contain an '__init__.py' file? Does your
> > scrips directory? What happens, if you pylint your scripts directory
> > via the project sources browser?
> >
> > The current code is assuming, that the project directory is a
> > package.
> >
> > Detlev
>
> Hi again,
>
> I wasn't aware that project directory is assumed to be a package. Now it
> is, but pylint still doesn't work. With some modules the result dialog
> is empty. With other it shows import errors when modules of my project
> are imported (although running pylint via konsole works fine).
> Launching pylint via the project sources browser makes no difference.
>
> Vicent
Would it be possible for you to send your project? Please directly to me, not
to the mail list. That way I would have a chance to analyse the problem.
Detlev
--
Detlev Offenbach
detlev at die-offenbachs.de
More information about the Eric
mailing list