-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Handle unions with typing.Callable aliases without TypeError #6540
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Comment |
Co-authored-by: youknowone <[email protected]>
Co-authored-by: youknowone <[email protected]>
Co-authored-by: youknowone <[email protected]>
Co-authored-by: youknowone <[email protected]>
Co-authored-by: youknowone <[email protected]>
Co-authored-by: youknowone <[email protected]>
Co-authored-by: youknowone <[email protected]>
Co-authored-by: youknowone <[email protected]>
Co-authored-by: youknowone <[email protected]>
Co-authored-by: youknowone <[email protected]>
Co-authored-by: youknowone <[email protected]>
|
Code has been automatically formatted The code in this PR has been formatted using git pull origin copilot/fix-typeerror-in-pytest |
Pytest on RustPython failed when evaluating
bool | Callable[...]because typing’s_CallableGenericAliaswasn’t accepted as unionable.__origin__/__args__from thetypingmodule) as valid union operands alongside built-in types and GenericAlias.typing_callable_union.pyto ensurebool | typing.Callable[[int], int]no longer raises.Example:
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.