[PyQt] Type annotations for pyqtSignals

Florian Bruhin me at the-compiler.org
Mon Nov 26 20:44:56 GMT 2018


(last one... for today :D)

Where Qt has signals, PyQt's type annotations seem to say it's a normal
function - like with QTimer.timeout:

  class QTimer(QObject):
      def timeout(self) -> None: ...

Shouldn't signals rather be defined like "timeout: QtCore.pyqtSignal",
which presumably also would make PyCharm suggest their
.connect/.disconnect method properly?


https://www.qutebrowser.org | me at the-compiler.org (Mail/XMPP)
   GPG: 916E B0C8 FD55 A072 | https://the-compiler.org/pubkey.asc
         I love long mails! | https://email.is-not-s.ms/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20181126/0216f484/attachment-0001.sig>

More information about the PyQt mailing list