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
feat(app-cmds): add support for 3.10 unions #853
Conversation
Signed-off-by: Alex Schoenhofen <alexanderschoenhofen@gmail.com>
…compare Suggested by Denver, tested on Python 3.10 and 3.8 Co-authored-by: Jonah Lawrence <jonah@freshidea.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haven't tested
Although, I think the title should be changed to explicitly state that this adds support for 3.10 unions because giving the pep number doesn't showcase this right away.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haven't tested but looks good to me.
# Conflicts: # nextcord/application_command.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested with channel type unions.
Signed-off-by: Alex Schoenhofen alexanderschoenhofen@gmail.com
Summary
Adds PEP 604 support to application commands, allowing the Python 3.10 style of unions.
Example:
arg1: str | None
Checklist
task pyright
and fixed the relevant issues.