[misc]: code optimisations of typing class, typos and grammar - #83
Open
wthrajat wants to merge 5 commits into
Open
[misc]: code optimisations of typing class, typos and grammar#83wthrajat wants to merge 5 commits into
typing class, typos and grammar#83wthrajat wants to merge 5 commits into
Conversation
Signed-off-by: wthrajat <rajatkhanduri290102@gmail.com>
Signed-off-by: wthrajat <rajatkhanduri290102@gmail.com>
Signed-off-by: wthrajat <rajatkhanduri290102@gmail.com>
Signed-off-by: wthrajat <rajatkhanduri290102@gmail.com>
Signed-off-by: wthrajat <rajatkhanduri290102@gmail.com>
MuhammadMuradG
requested changes
Apr 23, 2024
Collaborator
There was a problem hiding this comment.
Good typos catching. However, I prefer split this PR to 2 PRs to address each of the mentioned problems separately (one PR for typos and one PR for Union class). We can bypass this splitting problem in this PR and adopting splitting strategy of different tasks in the future PRs.
Changed in version 3.10: Unions can now be written as X | Y. See union type expressions.
Regarding to the adopting | instead of Union in typing module, I think this will limit the Python versions supported by our application to 3.10+ instead of 3.8+. Do we really need this?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes:
typing.Unionmethod, as recommended in the official documentation here: https://docs.python.org/3/library/typing.html#typing.UnionThis is a mini optimisation as we don't have to import the
typingmodule now.NOTE: Nothing to test or screen-record before and after as no functionality has been changed.PR Checklist: