Derived from the flake8-self linter.
What it does#
Checks for accesses on "private" class members.
Why is this bad?#
In Python, the convention is such that class members that are prefixed with a single underscore, or prefixed but not suffixed with a double underscore, are considered private and intended for internal use.
Using such "private" members is considered a misuse of the class, as there are no guarantees that the member will be present in future versions, that it will have the same type, or that it will have the same behavior. Instead, use the class's public interface.