How to verify that a snippet of Python code doesn't access protected members

  • Use pylint.

    Note: Still need to do a string search for "pylint: disable=protected-access" to find instances of disabled pylint warnings. There are valid reasons/instances for disabling associated protected-access messages.