-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[py] Fix ruff D415 warnings in docstrings #16536
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 ruff D415 warnings in docstrings #16536
Conversation
|
Thank you, @cgoldberg for this code suggestion. The support packages contain example code that many users find helpful, but they do not necessarily represent After reviewing the change, unless it is a critical fix or a feature that is needed for Selenium We actively encourage people to add the wrapper and helper code that makes sense for them to their own frameworks. |
User description
🔗 Related Issues
#16432 and #11442
💥 What does this PR do?
This PR cleans up docstrings and removes the ruff rule for ignoring D415 warnings.
🔄 Types of changes
PR Type
Cleanup
Description
Fix ruff D415 docstring warnings by adding periods to summary lines
Reformat multi-line docstrings to follow proper structure
Convert code examples from
>>>format to backticks or code blocksRemove D415 rule from ruff configuration ignore list
Diagram Walkthrough
File Walkthrough
webdriver.py
Fix docstring formatting and D415 violationspy/selenium/webdriver/chromium/webdriver.py
set_network_conditions()by changing quotedvariable to backticks
execute_cdp_cmd()docstring with proper period,restructured description, and converted example to backticks
options.py
Fix descriptor class docstring D415 violationspy/selenium/webdriver/common/options.py
_PageLoadStrategyDescriptordocstring by adding period andrestructuring with "See:" section
_UnHandledPromptBehaviorDescriptordocstring with period andproper formatting
_TimeoutsDescriptordocstring with period and restructuredreference link
webdriver.py
Comprehensive docstring cleanup and D415 fixespy/selenium/webdriver/remote/webdriver.py
file_detector_context()example from>>>format to codeblock
nameproperty docstring by removing unnecessary exampleexecute_cdp_cmd()docstring with period and restructureddescription
>>>format to backticks orcode blocks
methods
options.py
Fix Safari options descriptor docstringpy/selenium/webdriver/safari/options.py
_SafariOptionsDescriptordocstring by adding period to summaryline
points
explanations
select.py
Fix select module docstring D415 violationspy/selenium/webdriver/support/select.py
first_selected_optiondocstring by adding periodselect_by_value()docstring with "Example:" section andbackticks
select_by_visible_text()docstring with proper structuredeselect_by_value()anddeselect_by_visible_text()docstringssimilarly
webserver.py
Fix webserver test docstringpy/test/selenium/webdriver/common/webserver.py
log_message()docstring by adding period to end of summary lineremote_connection_tests.py
Fix test docstringpy/test/selenium/webdriver/remote/remote_connection_tests.py
test_browser_specific_method()docstring by adding periodpyproject.toml
Remove D415 from ruff ignore rulespy/pyproject.toml
requirement