Closed diwakergupta closed 12 years ago
Peewee uses metaclasses to give you "declarative" models. Your models and the fields you define as class attributes are valuable metadata and I cribbed the notion of using a metaclass to introspect these. It would be arguably more pythonic to do it differently, but this is the API I have chosen. You can see the details:
https://github.com/coleifer/peewee/blob/master/peewee.py#L2566
I'm not contesting the way Peewee does things. I'm merely asking if there's any way to make pylint + peewee happy short of disabling that error (which can mask legit bugs in other code)
On Fri, Aug 17, 2012 at 6:42 AM, Charles Leifer notifications@github.comwrote:
Peewee uses metaclasses to give you "declarative" models. Your models and the fields you define as class attributes are valuable metadata and I cribbed the notion of using a metaclass to introspect these. It would be arguably more pythonic to do it differently, but this is the API I have chosen. You can see the details:
https://github.com/coleifer/peewee/blob/master/peewee.py#L2566
— Reply to this email directly or view it on GitHubhttps://github.com/coleifer/peewee/issues/104#issuecomment-7818122.
Ahh, totally -- I am not very familiar with pylint so I'm not sure what hooks it provides to say "i know what i'm doing here". If you come up with a patch I'd consider merging.
This may be helpful http://stackoverflow.com/questions/115977/using-pylint-with-django
PeeWee modifies the model classes at RunTime. pylint doesn't like this and I get errors like: