On 01 février 10:39, JT Olds wrote:
> Hi all,

Hi,

[snip]
 
> I dug into the PyLint source, and it's doing a thing where for the file
> being linted, it adds the CWD to the PYTHONPATH. So, where Python expects
> /home/jt/repos/project/ to be part of the PYTHONPATH (or sys.path, as it
> is), PyLint provides /home/jt/repos/ as part of the PYTHONPATH, and NOT
> /home/jt/repos/project/
> 
> This does not match Python's import directory resolution behavior, and has
> caused us a considerable headache. I'd like to lint my source files as
> Python runs them, not as Pylint does. What would it take to change this
> behavior upstream?

The point is that pylint may be called using different arguments: a single 
python file as you do, but also multiple files or one or more module/packages
names. Unlike the python interpreter. Still the idea of handling python path
as closer as possible as the python interpreter is right. May be we should
have this behaviour when called with a single file as argument, and/or a
command line switch?
-- 
Sylvain Thénault, LOGILAB, Paris (01.45.32.03.12) - Toulouse (09.54.03.55.76)
Formations Python, Debian, Méth. Agiles: http://www.logilab.fr/formations
Développement logiciel sur mesure:       http://www.logilab.fr/services
CubicWeb, the semantic web framework:    http://www.cubicweb.org
_______________________________________________
Python-Projects mailing list
[email protected]
http://lists.logilab.org/mailman/listinfo/python-projects

Reply via email to