def visit_attribute()

in scripts/interface_privacy.py [0:0]


    def visit_attribute(self, node: ast.Attribute) -> None:
        """Visits ast.Attribute nodes."""
        # Check whether the attribute name starts with a single underscore
        if node.attr.startswith("_") and (not node.attr.startswith("__")):
            # Exclude "cls" and "self"
            if isinstance(node.value, ast.Name) and (node.value.id not in {"cls", "self"}):
                accessed_name = f"{node.value.id}.{node.attr}"
                self.violations.append((node.lineno, node.col_offset, accessed_name))
        self.generic_visit(node)