<div dir="ltr"><span class="gmail-im"><br>
> > There are any plans to add Python stubs files in PyQt5 or PyQt6?<br>
<br></span>> PyQt5 already comes with stub-files, though they are mostly optimized for IDE<br>
> completion rather than type checking.<br>
<br>
> There are community-maintained stubs for mypy here:<br><div>> <a href="https://github.com/stlehmann/PyQt5-stubs" rel="noreferrer" target="_blank">https://github.com/stlehmann/PyQt5-stubs</a></div><div><br></div><div>But This is not working well if the project uses some wrapper like qtpy. And it works well if stubs files are in a package (like PySide2).</div><div><br></div><div><br></div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Grzegorz Bokota<br></div></div></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">wt., 28 kwi 2020 o 20:34 Florian Bruhin <<a href="mailto:me@the-compiler.org">me@the-compiler.org</a>> napisał(a):<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Tue, Apr 28, 2020 at 08:28:32PM +0200, Grzegorz Bokota wrote:<br>
> There are any plans to add Python stubs files in PyQt5 or PyQt6?<br>
<br>
PyQt5 already comes with stub-files, though they are mostly optimized for IDE<br>
completion rather than type checking.<br>
<br>
There are community-maintained stubs for mypy here:<br>
<a href="https://github.com/stlehmann/PyQt5-stubs" rel="noreferrer" target="_blank">https://github.com/stlehmann/PyQt5-stubs</a><br>
<br>
Right now, most of the conversions needed are manual, though there are some<br>
ideas on how to further automate stuff floating around.<br>
<br>
Phil: You mentioned at some point that the generator part of SIP is being<br>
rewritten in Python as well, correct? I suppose this wouldn't be a good time<br>
for contributions to SIP to improve stubs upstream then? Is there any rough<br>
timeline on a Python-based SIP generator?<br>
<br>
Florian<br>
<br>
-- <br>
<a href="mailto:me@the-compiler.org" target="_blank">me@the-compiler.org</a> (Mail/XMPP) | <a href="https://www.qutebrowser.org" rel="noreferrer" target="_blank">https://www.qutebrowser.org</a> <br>
       <a href="https://bruhin.software/" rel="noreferrer" target="_blank">https://bruhin.software/</a> | <a href="https://github.com/sponsors/The-Compiler/" rel="noreferrer" target="_blank">https://github.com/sponsors/The-Compiler/</a><br>
       GPG: 916E B0C8 FD55 A072 | <a href="https://the-compiler.org/pubkey.asc" rel="noreferrer" target="_blank">https://the-compiler.org/pubkey.asc</a><br>
             I love long mails! | <a href="https://email.is-not-s.ms/" rel="noreferrer" target="_blank">https://email.is-not-s.ms/</a><br>
</blockquote></div>