[py] fixed a bug in bidi/session.py by removing mutable object as default value for function argument.#14286
Conversation
PR Reviewer Guide 🔍
|
PR Code Suggestions ✨
|
f7e1885 to
7cfeaaa
Compare
|
@diemol can you please trigger the workflow for this PR as well. Thanks! |
|
@diemol can you please trigger the workflow for this PR.. |
|
@diemol @AutomatedTester @titusfortner @pujagani can someone trigger the workflow for this PR please.. it's been more than couple of months since I raised it.. Thanks! |
…efault value for function argument. (SeleniumHQ#14286)
User description
Thanks for contributing to Selenium!
A PR well described will help maintainers to quickly review and merge it
Before submitting your PR, please check our contributing guidelines.
Avoid large PRs, help reviewers by making them as simple and short as possible.
Description
session_subscribeandsession_unsubscribe, the function parameterbrowsing_contextshad a mutable object as default value.browsing_contextstoNoneas default value to the parameter.Motivation and Context
It is not recommended/safe to assign mutable objects as default values for function parameters.
Types of changes
Checklist
PR Type
Bug fix, Enhancement
Description
bidi/session.pyby changing the default value of thebrowsing_contextsparameter toNonein thesession_subscribeandsession_unsubscribefunctions to avoid using mutable objects as default values.browsing_contextsas an empty list if it isNonein thesession_subscribeandsession_unsubscribefunctions.support/relative_locator.pyby adjusting the formatting of@overloadmethod definitions.Changes walkthrough 📝
session.py
Fix mutable default argument in
session_subscribeandsession_unsubscribepy/selenium/webdriver/common/bidi/session.py
browsing_contextsparameter toNoneinsession_subscribeandsession_unsubscribefunctions.browsing_contextsas an empty list if it isNone.relative_locator.py
Fix linting issues in `relative_locator.py`py/selenium/webdriver/support/relative_locator.py
@overloadmethoddefinitions.