![](https://secure.gravatar.com/avatar/d839243cb7d2a74d416aca0402d04119.jpg?s=120&d=mm&r=g)
Dear "code-quality _at_ python.org: I am trying to get pylint working with my Python code running under 3.6 on Centos 7 (fully updated). I found some issues and am trying to figure out how to report. The pylint pages says to look under "issue tracker" at https://github.com/PyCQA/pylint but I could find an issue tracker. The next option was to report it to this address. I am seeing a "W0212: Access to a protected member %s of a client class" regarding my use of "sys._getframe()". How can this be a warning if the Python documentation lists this as a method to use in their documentation? I am also getting an "E0602: Undefined variable %r" when I use __cached__. I understand that __cached__ may be undefined or defined, but pylint needs to allow me to test this to see what it is. Yeah, exception to the rule? Thanks ps: please send a reply to let me know if I sent this to the right place or in pylint's site is directing me incorrectly
![](https://secure.gravatar.com/avatar/6ce97b723f94387aab402fc49f5a1f6b.jpg?s=120&d=mm&r=g)
On 4/17/22 02:37, Paul Allen Newell wrote:
Dear "code-quality _at_ python.org:
I am trying to get pylint working with my Python code running under 3.6 on Centos 7 (fully updated). I found some issues and am trying to figure out how to report. The pylint pages says to look under "issue tracker" at https://github.com/PyCQA/pylint but I could find an issue tracker.
Uh.... that would be the tab labeled "Issues"
I am seeing a "W0212: Access to a protected member %s of a client class" regarding my use of "sys._getframe()". How can this be a warning if the Python documentation lists this as a method to use in their documentation?
It's a warning because the method name starts with an underscore, which by convention means it's intended for internal use. Further, the documentation of _getframe reinforces this, pointing out it should be used "for internal and specialized purposes only". If you've decided you know what you're doing, you can always quiet individual complaints from pylint, you don't have to accept every single thing it complains about.
I am also getting an "E0602: Undefined variable %r" when I use __cached__. I understand that __cached__ may be undefined or defined, but pylint needs to allow me to test this to see what it is. Yeah, exception to the rule?
If you're going to test (access?) something that may be undefined, you need to do so in a manner that lets your program survive in case it's undefined. That typically means using a try block or hasattr().
participants (2)
-
Mats Wichmann
-
Paul Allen Newell