Skip to content

[py] fix type hints for selenium.webdriver.remote.file_detector #9647

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

Merged

Conversation

hoefling
Copy link
Contributor

Description

This PR introduces a module selenium.types that contains types reused throughout the codebase. Unfortunately, I forgot to include that in #9606, which caused tests breakage.

Motivation and Context

The type of the input valid to be typed in a WebElement (Union[str, float, int]) is required for typing in several modules, so the proposal to avoid duplication is to move it to a common module selenium.types used to declare custom types. This approach is often used in large libraries, for example in tensorflow.

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.

@sonarqubecloud
Copy link

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

@AutomatedTester AutomatedTester merged commit 77788e0 into SeleniumHQ:trunk Jul 13, 2021
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.

2 participants