On 11/25/2022 12:00 PM, Robin Becker wrote:
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=, b='B')
C:\temp\python>mypy tdc.py
tdc.py:10: error: Argument 1 to "DC" has incompatible type
"Type[DC]"; expected "str" [arg
On 24/11/2022 13:50, Kirill Ratkin via Python-list wrote:
mypy --strict gives you detail info.
Thanks Kirill,
it seems --strict does find the errors. One of those is that on line 9 I have
to add a return type ie
def main() -> None:
.
if that is added then mypy without --strict also f
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=, 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 sou
Hi Robin,
mypy --strict gives you detail info.
On Thu, Nov 24, 2022 at 10:05 +, Robin Becker wrote:
> I haven't used dataclasses or typing very much, but while playing about I
> found this didn't give me an expected error
>
> (.py312) robin@minikat:~/devel/reportlab
> $ cat tmp/examples/tdc
On 11/24/2022 7:34 AM, Thomas Passin wrote:
On 11/24/2022 5:05 AM, Robin Becker wrote:
I haven't used dataclasses or typing very much, but while playing
about I found this didn't give me an expected error
(.py312) robin@minikat:~/devel/reportlab
$ cat tmp/examples/tdc.py && python tmp/examples
https://github.com/python/mypy/issues/12971
From: Python-list on
behalf of Thomas Passin
Date: Thursday, November 24, 2022 at 7:36 AM
To: python-list@python.org
Subject: Re: is mypy failing here
*** Attention: This is an external email. Use caution responding, opening
attachments or clicking
On 11/24/2022 5:05 AM, Robin Becker wrote:
I haven't used dataclasses or typing very much, but while playing about
I found this didn't give me an expected error
(.py312) robin@minikat:~/devel/reportlab
$ cat tmp/examples/tdc.py && python tmp/examples/tdc.py && mypy
tmp/examples/tdc.py
###