Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Support method plugin hooks on unions #6560
Currently both our plugin method hooks don't work with unions. This PR fixes this with three things:
The week point is interaction with binder, but IMO this is the best we can have for now. I left a comment mentioning that check for overlap should be consistent in two functions.
In general, I don't like special-casing, but I spent several days thinking of other solutions, and it looks like special-casing unions in couple more places is the only reasonable way to fix unions-vs-plugins interactions.
This PR may interfere with #6558 that fixes an "opposite" problem, hopefully they will work together unmodified, so that accessing union of literals on union of typed dicts works. Whatever PR lands second, should add a test for this.
Michael0x2a left a comment
I think looks good to me -- I couldn't really find anything I wanted to give feedback on.
I guess I am a little uncomfortable with how many different
I think we should merge this first -- I can add the extra tests to my PR.