-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[py] Fix: Mypy type annotation errors #15841
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
Conversation
…al_authenticator.py
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
The linter failed on your code: https://github.com/SeleniumHQ/selenium/actions/runs/15376689600/job/43272844202?pr=15841 You can fix the formatting automatically by running Once you update your branch, I will give it a review. Thanks! |
Hi, I have fixed the formatting issues. Please provide a review. Thanks! |
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.
LGTM 👍
Thank for the contribution!
User description
🔗 Related Issues
Fixes some issues in #15697
💥 What does this PR do?
This PR fixes several type annotation errors reported by Mypy in the following files:
py/selenium/webdriver/common/bidi/storage.py
py/selenium/webdriver/common/options.py
py/selenium/webdriver/common/virtual_authenticator.py
It improves static typing correctness, which will help catch bugs early and improve code readability and maintainability.
🔧 Implementation Notes
Fixed a few type hints for the above files.
💡 Additional Considerations
Will submit more small PRs to fix type annotations across the codebase.
🔄 Types of changes
PR Type
Bug fix
Description
Fix Mypy type annotation errors in three modules
Update type hints for class attributes and methods
Improve static typing for dictionary and Enum usage
Changes walkthrough 📝
storage.py
Add and correct type hints for Mypy compliance
py/selenium/webdriver/common/bidi/storage.py
from_dict
options.py
Specify type for mobile_options attribute
py/selenium/webdriver/common/options.py
mobile_options
attribute to have explicit dict typevirtual_authenticator.py
Simplify Enum member type annotations
py/selenium/webdriver/common/virtual_authenticator.py