You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
after I upgrade to pyqt5-stubs version 5.15.2.0, the XXX.clickked.XXX 's autocompletion in pycharm(2021.1) didn"t work.But in Vscode(with pylance) it works well.Then i downgrade to pyqt5-stubds version 5.14.2.2 ,the XXX.clickked.XXX 's autocompletion in pycharm(2021.1) starts working.
Here's the diff for reference. 5.14.2.2...5.15.2.0 It certainly became more complex, but also more accurate to the real stuff. Anyways, yeah, it would be helpful to see a minimal example of code showing the issue and a screenshot of the issue.
When I ctrl+left mouse PyCharm takes me to _their_ stubs. Though, the same goes for 5.14.2.2 for me here, so maybe I just have something wrong. I'll see if I can figure out how to disable the builtins, or...
If I rename PyCharm's builtin stubs to avoid their usage (is there a better way?) then I see the issue in pyqt5-stubs==5.15.2 while it works in pyqt5-stubs==5.14.2.2. In all cases it is offering the popup to complete .pushbutton and .clicked, but doesn't manage to understand how to work with .clicked. But, it does understand how to handle .s and .s.connect...
Ok, I added a few more things and still have no theories. Everything I code gets completion hints for connect. The button doesn't.
importtypingfromPyQt5importQtCorefromPyQt5importQtWidgetsclassC(QtCore.QObject):
b: QtCore.pyqtSignal=QtCore.pyqtSignal()
c: typing.ClassVar[QtCore.pyqtSignal] =QtCore.pyqtSignal()
pushbutton: QtWidgets.QPushButtondef__init__(self, parent=None):
super().__init__(parent)
self.pushbutton=QtWidgets.QPushButton()
defm(self):
self.b.connect()
self.c.connect()
self.pushbutton.clicked.conclassI(C):
passclassD(QtCore.QObject):
c: Ci: Idef__init__(self, parent=None):
super().__init__(parent)
self.c=C()
self.i=I()
defm(self):
self.c.b.connect()
self.c.c.connect()
self.i.b.connect()
self.i.c.connect()
self.c.pushbutton.clicked.connself.i.pushbutton.clicked.conn# what ctrl+left-click goes to for `.clicked## class QAbstractButton(QWidget):# <snip># clicked: typing.ClassVar[QtCore.pyqtSignal]
Activity
The-Compiler commentedon May 18, 2021
What do you mean with "XXX.clickked.XXX 's autocompletion"? Can you maybe show a screenshot or code sample?
altendky commentedon May 19, 2021
Here's the diff for reference. 5.14.2.2...5.15.2.0 It certainly became more complex, but also more accurate to the real stuff. Anyways, yeah, it would be helpful to see a minimal example of code showing the issue and a screenshot of the issue.
old...
and new.
altendky commentedon Jun 15, 2021
Trying with 5.15.3.0.
But...
When I
ctrl+left mousePyCharm takes me to _their_ stubs. Though, the same goes for 5.14.2.2 for me here, so maybe I just have something wrong. I'll see if I can figure out how to disable the builtins, or...altendky commentedon Jun 15, 2021
If I rename PyCharm's builtin stubs to avoid their usage (is there a better way?) then I see the issue in
pyqt5-stubs==5.15.2while it works inpyqt5-stubs==5.14.2.2. In all cases it is offering the popup to complete.pushbuttonand.clicked, but doesn't manage to understand how to work with.clicked. But, it does understand how to handle.sand.s.connect...Ok, I added a few more things and still have no theories. Everything I code gets completion hints for
connect. The button doesn't.