Hi,
  after everybody and their dog discussed the size of their screens, I
would like to reraise the question of the pylint support. I just
started to feed my model.py to it and had an initial rating of -16.3 -
a good start :-)

I got rid of all errors and warnings, but some of the things I had to
do where not quite to my liking:

--disable-msg=E1101:
  This is because pylint doesnt find the _SO_[gs]et_attribute methods
that SQLObject creates. the pylint side claims to support metaclasses,
so I dont know why it doesnt find these methods.

--max-public-methods=30  (instead of 20)
  more than half of my SQLObjects had more than 20 methods ...

--min-public-methods=0
  ... and the inner sqlmeta classes have no methods at all. BTW, I
changed all sqlmeta's to new style classes to get rid of W0232: class
has no __init__ method

--no-docstring-rgx=(__.*__)|(sqlmeta)|(_[gs]et_.*)
  this fixes C0111 for all sqlmetas and overloaded attribute getters
and setters.

--class-rgx=([A-Z_][a-zA-Z0-9]+)|(sqlmeta)$
  again sqlmeta had to be handled specially

I also added --include-ids to the settings, just to clutter the output.
And I changed
  from sqlobject import *
to
  from sqlobject import SQLObject
  from sqlobject.col import IntCol, StringCol, DateCol, DateTimeCol,
BoolCol
  from sqlobject.col import ForeignKey, UnicodeCol, EnumCol
  from sqlobject.joins import  MultipleJoin, RelatedJoin
  from sqlobject.inheritance import InheritableSQLObject
  from sqlobject.index import DatabaseIndex
  from sqlobject.main import SQLObjectNotFound
  from sqlobject.sqlbuilder import OR
Remember: Explicit is better than implicit. Most of the times. The
alternative would be to have
  --disable-msg=E0602,W0232,W0401,W0611
do get rid of the 56 E0602, 1 W0232, 1 W0401 and 33 W0611 my model
would produce otherwise ...

Oh, and I break my code lines at 80 columns, thank you :-)

Hope this helps,

mfg


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to