-
-
Notifications
You must be signed in to change notification settings - Fork 496
Update optional and union syntax in docs and code #3348
Copy link
Copy link
Open
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationhold: discussionThis pull request needs to be further discussed between maintainersThis pull request needs to be further discussed between maintainerstypingIs related to / changes python typingIs related to / changes python typing
Description
Activity
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationhold: discussionThis pull request needs to be further discussed between maintainersThis pull request needs to be further discussed between maintainerstypingIs related to / changes python typingIs related to / changes python typing
Type
Projects
- StatusShow more project fieldsTodo
Currently, both the docs and old code uses both the old style
Union[...]andOptional[...]as well as the new style... | ...and... | None.Given the new style is supported in all Python versions that Pycord currently supports, we should unify the syntax we use to use the new style; It also arguably makes them easier to read, particularly for large unions.
Scope is both all library code and all library docs, so this might be a large piece of repetitive work