You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
and line 38 refers to a manual object creation (testing purposes):
x = TimeInterval(1, 2)
which works fine without --mypy.
Not sure if this is a mypy error or has to do with Coconut. It's hard to report mypy errors with compiled Coconut code, as it's not runnable via python compiled.py and requires lots of Coconut libraries..
The text was updated successfully, but these errors were encountered:
@ArneBachmann Yeah, this is a known issue. MyPy can't handle the redefinition of __new__, so it doesn't know that the argument has been made optional. I'll keep this open and maybe try to ping the MyPy people about it.
If I'm recalling correctly this is an issue specific to the redefinition of __new__ for NamedTuple instances. It's been a while since I've futzed around with MyPy however. It's possibly related to this python/mypy#3307.
I have this code which compiles and runs fine:
Is compiled to Python code:
And it seems that the third argument is still optional.
When I run with
--mypy
, however, there is an issue raised:where line
31
refers to a function definition providing only the required arguments for the default value:and line 38 refers to a manual object creation (testing purposes):
which works fine without
--mypy
.Not sure if this is a mypy error or has to do with Coconut. It's hard to report mypy errors with compiled Coconut code, as it's not runnable via
python compiled.py
and requires lots of Coconut libraries..The text was updated successfully, but these errors were encountered: