Skip to content
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

Fix incorrect uses of 'NoReturn' type annotation #9540

Merged

Conversation

varunsurapaneni
Copy link
Contributor

@varunsurapaneni varunsurapaneni commented Jun 2, 2021

When a function or method explicitly or implicitly returns None, its
return type annotation should be None.
NoReturn should only be used when a function or method never returns
e.g., it always raises an Exception.

Thanks for contributing to Selenium!
A PR well described will help maintainers to quickly review and merge it

Before submitting your PR, please check our contributing guidelines.
Avoid large PRs, help reviewers by making them as simple and short as possible.

Description

Motivation and Context

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • I have read the contributing document.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

When a function or method explicitly or implicitly returns None, its
return type annotation should be 'None'.
'NoReturn' should only be used when a function or method never returns
e.g., it always raises an Exception.
@CLAassistant
Copy link

CLAassistant commented Jun 2, 2021

CLA assistant check
All committers have signed the CLA.

@AutomatedTester AutomatedTester merged commit 6d15373 into SeleniumHQ:trunk Jun 9, 2021
@AutomatedTester
Copy link
Member

Thank you for the patch!

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jun 9, 2021

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@varunsurapaneni varunsurapaneni deleted the fix-python-type-annotations branch June 9, 2021 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants