diff --git a/astroid/brain/brain_qt.py b/astroid/brain/brain_qt.py index ec26d49144..000540e3aa 100644 --- a/astroid/brain/brain_qt.py +++ b/astroid/brain/brain_qt.py @@ -10,10 +10,14 @@ from astroid.manager import AstroidManager -def _looks_like_signal(node: nodes.FunctionDef, signal_name: str ="pyqtSignal") -> bool: +def _looks_like_signal( + node: nodes.FunctionDef, signal_name: str = "pyqtSignal" +) -> bool: # Detect a PySide2 or PySide6 signal, the class changed locations as of QT 5ish if node.qname().partition(".")[0] in {"PySide2", "PySide6"}: - return any(cls.qname() == "Signal" for cls in node.instance_attrs.get("__class__", [])) + return any( + cls.qname() == "Signal" for cls in node.instance_attrs.get("__class__", []) + ) if "__class__" in node.instance_attrs: try: