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

List:       pykde
Subject:    Re: PyQt6 Signals are not correctly typed
From:       Vincent Vande Vyvre <vincent.vande.vyvre () telenet ! be>
Date:       2022-11-16 19:32:04
Message-ID: 2f8d731b-f7b4-84bc-2fc7-f56c27862ed1 () telenet ! be
[Download RAW message or body]

On 16/11/22 15:24, JakobDev wrote:
> I demonstrate it with the attached example. It's a very simple Program
> that just shows a Button. If you click the Button, it prints Hello
> World. So pretty normal. Now let's run mypy on this. It gives you this
> error:
>
> testtype.py:13: error: "Callable[[], None]" has no attribute "connect"
> Found 1 error in 1 file (checked 1 source file)
>
> Now let's open this in PyCharm. PyCharm also shows a error here. Signals
> are not correctly typed. It looks like they are typed as function. To be
> clear: This here is just a example. It happens with every Signals, which
> is annoying if you work on a bigger Project in PyCharm.
>
> What makes this these even worse, is that PyQt6 comes with a py.typed
> (see PEP561). It basically means, that this package can be considered as
> statically and correctly typed.

Nothing about typing, your code works well from a command line.

A bug in PyCharm ?

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

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