[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    PyQt6 stubs
From:       kristof.mulier () telenet ! be
Date:       2022-07-26 10:18:37
Message-ID: 527520147.245962772.1658830717103.JavaMail.zimbra () telenet ! be
[Download RAW message or body]

The mypy type checker is giving errors on every signal connection: 

error: "Callable[[], None]" has no attribute "connect" 

It seems like one needs PyQt6 stubs to prevent mypy from showing errors like this: 

[ https://stackoverflow.com/questions/66721309/mypy-showing-callable-has-no-attribute-connect-on-every-connect-in-pyqt \
| https://stackoverflow.com/questions/66721309/mypy-showing-callable-has-no-attribute-connect-on-every-connect-in-pyqt \
] 

However, this command doesn't work (I'm on Windows 11 with Python 3.9.12): 
> pip install PyQt6-stubs 

Apparently, there are no PyQt6 stubs available yet. Is that correct? I found a \
temporary source for PyQt6 stubs: 

[ https://github.com/python-qt-tools/PyQt6-stubs | \
https://github.com/python-qt-tools/PyQt6-stubs ] 

Unfortunately, mypy keeps spitting out errors for every signal connection. How can I \
fix this? 


[Attachment #3 (text/html)]

<html><body><div style="font-family: Verdana, Arial, Helvetica, sans-serif; \
font-size: 10pt; color: #000000"><div>The mypy type checker is giving errors on every \
signal connection:<br data-mce-bogus="1"></div><div><br \
data-mce-bogus="1"></div><div> <!--StartFragment--><code>error: "Callable[[], None]" \
has no attribute "connect"</code><!--EndFragment--> </div><div><br>It seems like one \
needs PyQt6 stubs to prevent mypy from showing errors like this:<br \
data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div><a \
href="https://stackoverflow.com/questions/66721309/mypy-showing-callable-has-no-attrib \
ute-connect-on-every-connect-in-pyqt">https://stackoverflow.com/questions/66721309/mypy-showing-callable-has-no-attribute-connect-on-every-connect-in-pyqt</a><br \
data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>However, this command \
doesn't work (I'm on Windows 11 with Python 3.9.12):</div><div> \
<!--StartFragment--><pre class="notranslate"><code>&gt; pip install \
PyQt6-stubs</code></pre><!--EndFragment--> </div><div><br \
data-mce-bogus="1"></div><div>Apparently, there are no PyQt6 stubs available yet. Is \
that correct? I found a temporary source for PyQt6 stubs:<br \
data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div><a \
href="https://github.com/python-qt-tools/PyQt6-stubs">https://github.com/python-qt-tools/PyQt6-stubs</a><br \
data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>Unfortunately, mypy \
keeps spitting out errors for every signal connection. How can I fix this?<br \
data-mce-bogus="1"></div></div></body></html>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic