| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
I realised there is a simpler and more powerful approach than the one taken in python#19600. This basically adds the new "Step 2" to the original code.
There was a problem hiding this comment.
Thanks, looks good -- just one potential code path that seems redundant.
Sorry, something went wrong.
| elif isinstance(current_type, AnyType): | ||
| inner_type: Type = AnyType(TypeOfAny.from_another_any, current_type) | ||
| inner_types = [inner_type] * len(o.patterns) | ||
| elif isinstance(current_type, TupleType): |
There was a problem hiding this comment.
Second check against TupleType that can never be taken?
Sorry, something went wrong.
|
According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅ |
Sorry, something went wrong.
Fixes #18950 Fixes this comment #19081 (comment) (previously improved on by #20744 and #20782 )
| Back | FazBrowse Home | New Git URL |
I realised there is a simpler and more complete approach than the one taken in #19600.
This adds the new "Step 2" to the original code. Best way to review the diff is probably to check it out and review it squashed with #19600 , but really the net logic change is just "Step 2"
Fixes #15190
Fixes #17549
Fixes #17600
Mostly fixes #18039
Helps with things in #19081