[PyQt] Wrong type annotation for qInstallMessageHandler

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


Hi,

The generated QtCore.pyi says:

  def qInstallMessageHandler(a0: typing.Optional[typing.Callable[[], None]]) -> typing.Optional[typing.Callable[[], None]]: ...                                       

(i.e., expecting a callable not taking any arguments, which is wrong)
despite the annotation in sip/QtCore/qlogging.sip looking correct:

  SIP_PYCALLABLE qInstallMessageHandler(SIP_PYCALLABLE /AllowNone,TypeHint="Optional[Callable[[QtMsgType, QMessageLogContext, QString], None]]"/) /TypeHint="Optional[Callable[[QtMsgType, QMessageLogContext, QString], None]]"/;

Not sure what's wrong there though, and whether it's in PyQt or in sip.

Florian

-- 
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/81c107ca/attachment.sig>


More information about the PyQt mailing list