Repository navigation
Handle unions with GenericAlias subclasses without TypeError - #6540
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. Comment |
|
Code has been automatically formatted The code in this PR has been formatted using git pull origin copilot/fix-typeerror-in-pytest |
youknowone
left a comment
There was a problem hiding this comment.
ensure test_types and test_typing working
| let Some(_) = module | ||
| .as_ref() | ||
| .and_then(|m| m.downcast_ref::<PyStr>()) | ||
| .filter(|m| m.as_str() == TYPING_MODULE) | ||
| else { | ||
| return false; | ||
| }; |
There was a problem hiding this comment.
Simplified unionability to allow subclasses of types.GenericAlias/types.UnionType instead of the prior typing-specific check (3b4e565).
There was a problem hiding this comment.
test need to be placed in extra_tests/snippets/stdlib_typing.py
There was a problem hiding this comment.
Moved the Callable union snippet into extra_tests/snippets/stdlib_typing.py and dropped the standalone file (3b4e565).
Ran targeted suites after the fixes: |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
@copilot fix clippy |
Co-authored-by: youknowone <69878+youknowone@users.noreply.github.com>
Co-authored-by: youknowone <69878+youknowone@users.noreply.github.com>
Co-authored-by: youknowone <69878+youknowone@users.noreply.github.com>
Co-authored-by: youknowone <69878+youknowone@users.noreply.github.com>
Co-authored-by: youknowone <69878+youknowone@users.noreply.github.com>
Co-authored-by: youknowone <69878+youknowone@users.noreply.github.com>
Co-authored-by: youknowone <69878+youknowone@users.noreply.github.com>
Co-authored-by: youknowone <69878+youknowone@users.noreply.github.com>
Co-authored-by: youknowone <69878+youknowone@users.noreply.github.com>
Co-authored-by: youknowone <69878+youknowone@users.noreply.github.com>
Co-authored-by: youknowone <69878+youknowone@users.noreply.github.com>
Co-authored-by: youknowone <69878+youknowone@users.noreply.github.com>
Co-authored-by: youknowone <69878+youknowone@users.noreply.github.com>
1d2b0db to
c2c29c6
Compare
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.