Uh oh!
There was an error while loading. Please reload this page.
Fix mishandling of typing.Self in attrs generated inits - #14689
Conversation
This comment has been minimized.
This comment has been minimized.
The test run seems a bit confusing, as locally, it succeeds (outside of the test suite). Is it possible that the test have some configuration that may cause the behaviour to change? (Looking more towards |
A5rocks
commented
Feb 13, 2023
You can specify flags at the top of the test ( Additionally I think this |
davfsa
commented
Feb 13, 2023
The flag didn't seem to do much, specially given that it seems to be the default since mypy 0.600 (as per https://mypy.readthedocs.io/en/stable/kinds_of_types.html#no-strict-optional) This is really confusing, but I will have another look later |
davfsa
commented
Feb 14, 2023
@A5rocks you were actually right with the flag, i just seemed to have typed I also merged similar code function as you pointed out. Hope it looks good :) |
This comment has been minimized.
This comment has been minimized.
JukkaL
left a comment
There was a problem hiding this comment.
Thanks for the PR! A few comments and questions below.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This comment has been minimized.
This comment has been minimized.
davfsa
commented
Feb 15, 2023
@JukkaL Addressed one of your points and got questions about the other ones :) |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅ |
Fix mishandling of
typing.Selfinattrsgenerated inits by using the same expansion method as thedataclassespluginFixes#14685