-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[py] Cleanup and convert more doctrings to google-style #16503
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] Cleanup and convert more doctrings to google-style #16503
Conversation
…odules in webdriwer common
…er classes webkitgtk
…r, RelativeBy, and Select classes
… webdriver classes
|
Thank you, @iampopovich 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. |
|
@cgoldberg check please |
PR Code Suggestions ✨No code suggestions found for the PR. |
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. Thanks!
I'll merge it as soon as the formatter runs in CI.
User description
🔗 Related Issues
relates to #11442
💥 What does this PR do?
This pull request focuses on improving the clarity and consistency of docstrings and documentation throughout several core Selenium Python modules. The changes modernize docstring formatting, replace legacy usage examples with standardized sections, and simplify property documentation for maintainability and readability.
Key changes include:
Docstring Standardization and Improvements:
action_chains.py,alert.py,log.py, andproxy.pyto use the standardArgs:andExample:(where appropriate) sections, replacing the older:Args:and:Usage:formats for better readability and consistency. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] [22] [23] [24]Property and Attribute Documentation Simplification:
Proxyclass (proxy.py) with concise one-line descriptions for each proxy attribute, making the code easier to maintain and understand.Example Section Modernization:
alert.pyandlog.pyto use anExample:section instead of the previous:Usage:format, aligning with modern Python documentation standards. [1] [2] [3] [4]Overall, these changes bring the codebase's documentation up to date with best practices, making it more accessible for both new and experienced contributors.
🔧 Implementation Notes
💡 Additional Considerations
🔄 Types of changes
PR Type
Documentation
Description
Standardized docstring format from
:Args:toArgs:across Python modulesReplaced
:Usage:sections withExample:for consistencySimplified property docstrings in proxy and timeouts classes
Updated method documentation in action chains, alert, and other core classes
Improved docstring formatting to follow Google style guide conventions
Diagram Walkthrough
File Walkthrough
22 files
Converted docstrings to Google style formatUpdated Args and Usage to Example formatReplaced Usage sections with Example formatSimplified property docstrings significantlyStandardized Args and Returns documentationSimplified property docstrings and Args formatUpdated Args and Returns to Google styleConverted Args and Returns to Google styleUpdated docstring to Google style formatStandardized docstring format and improved clarityConverted Args to Google style formatUpdated docstring to Google style formatImproved docstring clarity and Args formatReplaced Usage with Example and standardized ArgsUpdated docstring to Google style formatStandardized Args and improved docstring formattingConverted Parameters to Args and standardized formatUpdated Args and Raises to Google style formatStandardized Args and Returns documentationUpdated docstring to Google style formatConverted Args to Google style formatUpdated docstring to Google style format