[py] Fix ruff D415 warnings in docstrings#16536
Merged
cgoldberg merged 1 commit intoSeleniumHQ:trunkfrom Oct 31, 2025
Merged
Conversation
Member
|
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. |
This was referenced Dec 7, 2025
This was referenced Dec 15, 2025
This was referenced Jan 1, 2026
This was referenced Jan 19, 2026
This was referenced Feb 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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