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

Add type to parameter of webelement.WebElement.send_keys #13492

Merged
merged 3 commits into from
Mar 26, 2024
Merged

Add type to parameter of webelement.WebElement.send_keys #13492

merged 3 commits into from
Mar 26, 2024

Conversation

adamtheturtle
Copy link
Contributor

Description

I have set the type of *value to AnyKey.
I chose AnyKey rather than str, despite the method docstring saying that value is "a string", because the method uses "".join(map(str, value)), which tells me that maybe a value element may not be a string.

Motivation and Context

Without this, pyright in strict mode gives me a reportUnknownMemberType error.

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.

@pujagani pujagani added the C-py label Jan 29, 2024
Copy link
Member

@diemol diemol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Python folks in the project tell me that using str is more suitable, if you want to add this.

@adamtheturtle
Copy link
Contributor Author

@diemol - sure, I made the change.

Copy link
Member

@diemol diemol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @adamtheturtle!

@diemol diemol merged commit 1b06b13 into SeleniumHQ:trunk Mar 26, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants