On 10 août 22:17, John Shimek wrote:
> Hi,

hi, 

> I have been trying to use Pylint with some Django and Google App
> Engine projects. The problem I have is that the Django and Google
> modules are always in the PYTHONPATH, but are through code when run
> using a manage.py or other script. I would rather not change my
> enviroment to suit Pylint, so I created an option for Pylint called
> ignored-modules which is a csv list of top level modules to not
> attempt to import. For example, in my .pylintrc, I have the following
> line:
> 
> ignored-modules=django,google
> 
> Then any "from django.core import foo" and "from google.api import
> bar" will be skipped. My patch just includes the code to do this. I
> don't have any tests or docs, because I am not sure how to test this
> or where to put the docs for this? If this is something that looks
> worthwhile to be added to Pylint, I would be happy to add tests and
> docs with some guidance.
 
That's fine with me, though I would lilke a few enhancements before 
including your patch:

* test. Pylint has an automatic functional test system so it should be
  easy to include a case for your option: see python modules in test/input
  and expected output in test/messages. There are a few conventions to respect
  but you should be able to go ahead by taking a look at existing files. Don't
  hesitate to ask question here if you need help.

* I would like an option name closer to what it does. For me it does'nt 
"ignore" 
  the module, it simply doesn't emit the "module does'nt exist" message, right?
  maybe you or others on the list have an idea of what a better name could be.

Regarding documentation, it should be ok as long as the option is correctly 
described (eg 'help' entry in the option's dict).

Anyway, thank you very much for your contribution.
-- 
Sylvain Thénault                               LOGILAB, Paris (France)
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