[PyQt] Type stubs erroneous

Florian Bruhin me at the-compiler.org
Mon Sep 12 17:49:53 BST 2016


* Phil Thompson <phil at riverbankcomputing.com> [2016-09-12 17:34:04 +0100]:
> On 12 Sep 2016, at 5:21 pm, Sebastian Messmer <heinzisoft at web.de> wrote:
> > 
> > I tried using the PyQt5 type stubs, but they're throwing a lot of errors.
> > Will there be valid type hints or type stubs provided in a future release?
> > 
> > This issue currently forces me to use '--silent-imports' in mypy, which disables a lot of checks I'd like to have.
> > 
> > I found https://riverbankcomputing.com/pipermail/pyqt/2016-May/037534.html , but it didn't seem to be resolved there.
> 
> As I said in the reply to that email, I don't think is possible to
> create stub files for PyQt that are "valid". Personally I think that
> is a fault with PEP 484. If stub files are more trouble than they
> are worth then I will happily drop them.
> 
> What I want is somebody who knows the subject (which rules me out)
> to look at the issue in detail and suggest changes to make stub
> files useful.

I don't really know much more either, but I tried to make the stub
files useful with mypy:

https://github.com/The-Compiler/qutebrowser/compare/c47ee07...mypy

This makes them less "correct" in some ways, but more useful for me.
Note that's highly work-in-progress and not polished at all though.

Unfortunately I did run out of time before I could get something
usable, but I intend to pick the topic up again somewhen over the next
weeks to months.

Florian

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


More information about the PyQt mailing list