-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[py] Fix mypy errors #16283
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
[py] Fix mypy errors #16283
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨No code suggestions found for the PR. |
The changes look good, could you also fix mypy errors in |
I am under assumption we keep PRs small . I'm going by fixing mypy errors per file I see them which aren't fix yet. |
That's really confusing that the base Instead of the changes in this PR, would it make sense to change the type annotation on the |
I have another question to this, before mypy errors were generated how did this code previously function? I noticed what you mentioned. Interaction is a parent class to more than one child classes. I am asking to understand how did this work before mypy errors? Sorry if this question sounds basic for python I'm trying to make sense of this. |
In the The type hint in the base class looks incorrect to me, but it works fine because type hints aren't enforced at runtime.. they just cause errors in mypy. |
…orrected other files
Thanks for the explanation Corey. Made changes, kindly review |
@cgoldberg , requesting review and merge of the PR. if any more changes aren't required. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pallavigitwork sorry for the delay. I am requesting one tiny change.. besides that it LGTM. I'll merge it as soon as you make the change from my comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! 👍
Thank you . |
User description
🔗 Related Issues
Fixes the mypy error from #15697 - interaction file and related files
💥 What does this PR do?
the mypy listed out error for the wheel action python file and other related file. it is because of type mismatch.
changed interaction to expect InputDevice as source passed, instead of str data type.
changed other files related to this.
🔧 Implementation Notes
💡 Additional Considerations
ran the format script
and the pytest .
🔄 Types of changes
PR Type
Bug fix
Description
Fixed mypy type error in Interaction and other related files.
modified the interaction to expect source as InputDevice and not string.
Diagram Walkthrough
File Walkthrough
wheel_actions.py
Fix mypy type error in WheelActions
py/selenium/webdriver/common/actions/wheel_actions.py
source.type
to parent class instead ofsource
objectself._source
attribute to store the wheel input sourcepause()
andscroll()
methods to useself._source
instead ofself.source