is mypy failing here

Robin Becker robin at reportlab.com
Fri Nov 25 12:00:32 EST 2022


On 24/11/2022 14:10, Thomas Passin wrote:
.............
>>
>> C:\temp\python>py -V
>> Python 3.10.4
>>
>> C:\temp\python>py tdc.py
>> DC(a=<class '__main__.DC'>, b='B')
>>
>> C:\temp\python>mypy tdc.py
>> tdc.py:10: error: Argument 1 to "DC" has incompatible type "Type[DC]"; expected "str"  [arg-type]
>> Found 1 error in 1 file (checked 1 source file)
>>
> Forgot the mypy version:
> 
> C:\Users\tom>mypy --version
> mypy 0.910
> 
interesting; I'm on archlinux and neither the system python 3.10.8 / mypy 0.982 gives an error. I did try running in my 
self build 3.10.8 with latest mypy 0.991 and mypy 0.910 and I still don't get an error.

I'll break out the windows 10 laptop and see what happens there.

You ran with the py runner. I wonder if that does something special.
--
Robin Becker


More information about the Python-list mailing list