-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[py] Fix D205 ruff warns for python package formatting #16537
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
base: trunk
Are you sure you want to change the base?
[py] Fix D205 ruff warns for python package formatting #16537
Conversation
|
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 |
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.
i've finished self-review
…ty across multiple webdriver classes
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
|||||||||||||||||||||||
|
the last one commit fixes some leftovers after self-review. no more changes from me in this branch |
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||||||||
User description
🔗 Related Issues
relates to #11442 and probably completes #16432
💥 What does this PR do?
🔧 Implementation Notes
This pull request primarily refines and standardizes docstrings across several Python modules, improving clarity and consistency in documentation. Additionally, minor code style improvements are made, such as explicit return type annotations and configuration updates. The changes are grouped below by theme.
Docstring and Documentation Improvements
py/selenium/common/exceptions.py, making them more concise and easier to read. [1] [2] [3] [4] [5] [6] [7] [8] [9]py/selenium/webdriver/chrome/service.py,py/selenium/webdriver/chromium/service.py,py/selenium/webdriver/chromium/webdriver.py, andpy/selenium/webdriver/chromium/options.py. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13]ActionChainsand related methods inpy/selenium/webdriver/common/action_chains.py, enhancing clarity for automation actions. [1] [2] [3]py/generate_api_module_listing.pyfor better readability and structure.Code Style and Typing Improvements
py/generate.pyfor better type safety and code clarity. [1] [2] [3]Configuration Updates
D205docstring linting rule frompy/pyproject.toml, aligning linting configuration with the new docstring style.💡 Additional Considerations
🔄 Types of changes
PR Type
Documentation, Enhancement
Description
Standardize and shorten docstrings across Python modules for clarity
Add explicit return type annotations to methods and properties
Improve docstring formatting with proper blank lines and structure
Refactor exception class docstrings for conciseness
Update configuration to remove D205 ruff rule for docstring formatting
Diagram Walkthrough
File Walkthrough
50 files
Add return types and refactor docstringsShorten and clarify expectation condition docstringsCondense exception class docstringsImprove ActionChains docstring formattingSimplify property docstringsRefactor WebElement method docstringsClarify Firefox driver docstringsImprove Select class docstring clarityShorten ChromiumDriver docstringsCondense profile-related docstringsRefactor EventFiringWebDriver docstringsImprove RelativeBy class docstringsEnhance options class docstringsClarify Firefox options docstringsShorten decorator docstringsAdd return types and simplify docstringsImprove switch_to method docstringsRefactor Service class docstringsImprove module docstring formattingShorten Edge service docstringImprove BrowsingContext method docstringsRefactor test module docstringImprove test docstring formattingClarify Log class docstringsAdd return types and simplify docstringsImprove Edge options docstringsShorten binary path method docstringImprove Safari service docstringShorten Firefox service docstringCondense test docstringCondense test docstringShorten ChromiumService docstringMaintain WPEWebKit service docstringShorten FileDetector docstringShorten IE driver docstringMaintain WebKitGTK service docstringShorten Chrome service docstringImprove certificate bundle docstringShorten DriverFinder docstringShorten WPEWebKit quit method docstringShorten WebKitGTK quit method docstringShorten Proxy class docstringImprove test docstring formattingImprove print options docstringImprove IE options docstringsShorten Safari driver docstringImprove URL connectivity check docstringMaintain shadow root find element docstringImprove error handler docstringImprove test webserver module docstring1 files
Add return type annotations to properties1 files
Remove D205 ruff rule from configuration