Fixed incorrect use of NoReturn type-hint for Python.#10120
Merged
titusfortner merged 1 commit intoSeleniumHQ:trunkfrom Dec 24, 2021
cpburnz:patch-1
Merged
Fixed incorrect use of NoReturn type-hint for Python.#10120titusfortner merged 1 commit intoSeleniumHQ:trunkfrom cpburnz:patch-1
NoReturn type-hint for Python.#10120titusfortner merged 1 commit intoSeleniumHQ:trunkfrom
cpburnz:patch-1
Conversation
The [NoReturn](https://docs.python.org/3/library/typing.html#typing.NoReturn) type-hint in Python indicates the function never returns (e.g., it always raises an exception). These methods are incorrectly marked as `NoReturn` when they in fact return no value (`None`), and should by hinted using `None`.
8 tasks
colons
added a commit
to colons/selenium
that referenced
this pull request
Dec 21, 2021
This is an extension of what was done in SeleniumHQ#10120.
titusfortner
approved these changes
Dec 24, 2021
8 tasks
elgatov
pushed a commit
to elgatov/selenium
that referenced
this pull request
Jun 27, 2022
The [NoReturn](https://docs.python.org/3/library/typing.html#typing.NoReturn) type-hint in Python indicates the function never returns (e.g., it always raises an exception). These methods are incorrectly marked as `NoReturn` when they in fact return no value (`None`), and should by hinted using `None`.
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.
Fixed incorrect use of
NoReturntype-hint for Python.Description
The NoReturn type-hint in Python indicates the function never returns (e.g., it always raises an exception). These methods are incorrectly marked as
NoReturnwhen they in fact either return no value (None) or raise an exception on error. These should be hinted usingNone.Motivation and Context
It fixes some incorrect type-hints.
Types of changes
Checklist