Hey all,

I have a rather large codebase in which I'm using PyLint. I am using a
number of data-serialization classes (Google Protocol Buffers) that
use metaclasses to fill out the fields. Of course, PyLint doesn't
understand metaclasses, so I am unable to have PyLint's typechecker
work on these classes.

However, the problem is that these class names are not unique in my
code base. There's a number of classes that share the same name
(though not the same import path), but I can't figure out how to get
PyLint to disable a specific class as opposed to all classes with the
same name.

How do I do this?

Things I've tried:
1) using a class more specific import name:
(ignored-classes=module.module.Class). For some reason this doesn't
work for me. I can only seem to get this to work if I use
ignored-classes=Class. Should this work? What am I doing wrong?
2) using the generated classes' base class (ignored-classes=Message,
ignored-classes=message.Message,
ignored-classes=google.protobuf.message.Message). Should this work?
This would be a pretty swanky solution.
3) adding pylint disabling comments to the specific protocol buffer
message definitions. This doesn't help callers of methods on a message
in some other file though. :(

Last resort: I could name all protocol buffer classes uniquely. This
is a really gross solution for us as it would require a lot of code
churn.

Is there something I am missing? What should I do for this case?

-JT
_______________________________________________
Python-Projects mailing list
Python-Projects@lists.logilab.org
http://lists.logilab.org/mailman/listinfo/python-projects

Reply via email to