-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[py] Fix type annotations in the chromium webdriver file #16309
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
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
…rom other class in package
@cgoldberg kindly let me know if any more change is 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.
LGTM now. Thanks.
Thank you. |
Hey there @pallavigitwork @cgoldberg I wanted to raise that removing the default My team has a bunch of scripts that just started failing in 4.36.0 because we instantiate I didn't create an issue because I'm not sure if this was an intentional interface change, but I wanted to bring it up here. |
@cam-barts ouch... you are right. I will fix this today. In the meantime, can you use the Chrome/ChromeOptions/ChromeService classes instead? or do you specifically need Chromium? The regular Chrome class should work for running Chromium browser. The Chromium/ChromiumOptions/ChromiumService classes are base classes we use for Edge and Chrome and usually are not instantiated directly. |
@cam-barts this should be fixed with: #16372 |
Thanks so much @cgoldberg!
I'm not certain if there is a specific reason we are using Chromium instead of Chrome, I can certainly investigate that. We were able to mitigate the issue by temporarily pinning to v4.35.0, so we're back to good on my end at least, but I'll still investigate if we can use the Chrome classes. Thanks again for your rapid support on this! |
sorry about that @cam-barts |
User description
🔗 Related Issues
#15697
💥 What does this PR do?
this PR fixes the mypy errors of the chromium, webdriver.py file .
🔧 Implementation Notes
The mypy errors were resolved by using ChromiumService, instead Service, and
ChromiumOptions instead of ArgOptions
💡 Additional Considerations
🔄 Types of changes
PR Type
Bug fix
Description
Fixed mypy type errors in chromium webdriver
Replaced generic types with specific chromium types
Added proper default value handling for parameters
Improved type safety with string conversions
Diagram Walkthrough
File Walkthrough
webdriver.py
Fix mypy errors with chromium-specific types
py/selenium/webdriver/chromium/webdriver.py
Service
andArgOptions
imports withChromiumService
and
ChromiumOptions
Optional typing
parameters