Hello all!
I want to present pylint_web2py2 -- it is a pylint plugin for web2py that 
suppresses most errors caused by Pylint's ignorance of web2py design 
details.
Originally it was based on pylint-web2py by Derek Ludwig, but now it very 
different from its ancestor.

Main features:
-It adds globals from models to controllers and other models
-It is aware of web2py module paths (gluon/site-packages/application 
modules)
-It adds global objects (like request, DAL, translator etc) to models and 
controllers.

You can install it with pip: pip install pylint_web2py2

To enable it:
 - Add `--load-plugins=pylint_web2py2` to pylint options 
or 
- Add `load-plugins=pylint_web2py2` to your .pylintrc
It doesn't transform the code not belonging to web2py, so it's easier to 
add the plugin to .pylintrc.

Please test it and report issues to 
https://github.com/flagist0/pylint_web2py2/issues

Currently all the issues are related to model names:
-If you used application wizard to create the app then there is a model 
called 0.py. 0 is not a valid module name (try 'import 0'), so the plugin 
fails when trying to import it. Renaming 0.py to _0.py fixes the problem.
-If you have model called scheduler, plugin imports another module of the 
same name from Python distribution. Renaming the model fixes the problem.

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to