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
First reveal type is for PartialGuild before the inheritance and the second one is for InviteGuild after the inheritance, note that all the attributes that should be inherited aren't there in the init
The interesting thing about this is that it only happens with this specific class inheritance, no other, and moving the class to a different file temporarily makes it work perfectly.
I am sorry I haven't been able to provide a more consise example, as I have not been able to figure out what is going on nor reproduce it in any other environment.
Package versions
mypy/mypyc - 0.910
attrs - 21.2.0
The text was updated successfully, but these errors were encountered:
davfsa
changed the title
Incorrect call-arg error when using attrs
Incorrect call-arg error when using attrs inheritance
Aug 3, 2021
That seems to stop being true when compiling with mypyc because of the plugin mypyc uses to put all modules placed in a single mypyc group in the same SCC, because removing that plugin does appear to get rid of these errors.
Funny thing I found out too, if you try to reveal the type of the class that errors right before it is defined, it reveals the type correctly and works fine (the reveal type prevents it from compiling, as you would expect). Similarly, moving the class definition to any other file works too.
I recently tried using mypyc to speedup our python project, but I encountered this unfixable error that doesn't appear with strict mypy.
First reveal type is for
PartialGuildbefore the inheritance and the second one is forInviteGuildafter the inheritance, note that all the attributes that should be inherited aren't there in the initThe interesting thing about this is that it only happens with this specific class inheritance, no other, and moving the class to a different file temporarily makes it work perfectly.
Code can be found here: https://github.com/davfsa/hikari/tree/69274b58b3c139872d9b051a65aac67dde378b14
I am sorry I haven't been able to provide a more consise example, as I have not been able to figure out what is going on nor reproduce it in any other environment.
Package versions
mypy/mypyc - 0.910
attrs - 21.2.0
The text was updated successfully, but these errors were encountered: