Skip to content

[py] Fixed Incorrect Tabbing in DocStrings #15096

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

Merged
merged 5 commits into from
Jan 17, 2025

Conversation

shbenzer
Copy link
Contributor

@shbenzer shbenzer commented Jan 16, 2025

User description

Description

This PR tweaks the tabbing in new docstrings to improve overall appearance

Motivation and Context

Readability

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • I have read the contributing document.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

PR Type

Documentation


Description

  • Fixed inconsistent tabbing in docstring parameters across multiple files.

  • Improved readability and formatting of docstring sections.

  • Enhanced consistency in parameter descriptions and spacing.


Changes walkthrough 📝

Relevant files
Documentation
action_builder.py
Fixed tabbing in `add_pointer_input` docstring                     

py/selenium/webdriver/common/actions/action_builder.py

  • Adjusted tabbing in the add_pointer_input docstring.
  • Improved alignment for better readability.
  • +1/-0     
    webdriver.py
    Corrected tabbing in multiple method docstrings                   

    py/selenium/webdriver/remote/webdriver.py

  • Fixed tabbing inconsistencies in multiple method docstrings.
  • Enhanced readability by aligning parameter descriptions.
  • +9/-0     
    webelement.py
    Adjusted tabbing in `_execute` docstring                                 

    py/selenium/webdriver/remote/webelement.py

  • Fixed tabbing in the _execute method docstring.
  • Improved alignment for parameter descriptions.
  • +3/-2     
    wait.py
    Fixed tabbing in constructor and method docstrings             

    py/selenium/webdriver/support/wait.py

  • Corrected tabbing in constructor and method docstrings.
  • Improved spacing and alignment for better readability.
  • +5/-0     

    💡 PR-Agent usage: Comment /help "your question" on any pull request to receive relevant information

    @shbenzer shbenzer changed the title [py] Fixed Incorrect Tabbing in DocStrings [py] Improved Tabbing in DocStrings Jan 16, 2025
    @qodo-merge-pro qodo-merge-pro bot changed the title [py] Improved Tabbing in DocStrings [py] Fixed Incorrect Tabbing in DocStrings Jan 16, 2025
    Copy link
    Contributor

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    ⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ Recommended focus areas for review

    Documentation Error

    The docstring for poll_frequency parameter in fedcm_dialog method has incorrect formatting - "floatHow" appears to be a typo and should be split into type and description.

    poll_frequency : floatHow
        - Frequently to poll

    Copy link
    Contributor

    qodo-merge-pro bot commented Jan 16, 2025

    PR Code Suggestions ✨

    Explore these optional code suggestions:

    CategorySuggestion                                                                                                                                    Score
    General
    Fix malformed parameter type and description that could cause documentation parsing issues

    Fix the malformed parameter description in fedcm_dialog(). The 'poll_frequency'
    parameter description is incorrectly formatted, with 'How' appended to the type.

    py/selenium/webdriver/remote/webdriver.py [1504-1505]

    -poll_frequency : floatHow
    -    - Frequently to poll
    +poll_frequency : float
    +    - How frequently to poll
    • Apply this suggestion
    Suggestion importance[1-10]: 8

    Why: The suggestion fixes a critical documentation error where the type and description are malformed, which could break documentation generation tools and confuse users. The fix properly separates the type from the description.

    8

    @VietND96
    Copy link
    Member

    @shbenzer, in a PR I saw you mentioned that a package needs to add to format.sh. Did you do it?

    @shbenzer
    Copy link
    Contributor Author

    No packages need to be added to the script. The script was failing, and I fixed it by reinstalling the packages it uses

    @VietND96 VietND96 merged commit 487b9a2 into SeleniumHQ:trunk Jan 17, 2025
    17 checks passed
    sandeepsuryaprasad pushed a commit to sandeepsuryaprasad/selenium that referenced this pull request Mar 23, 2025
    gryznar pushed a commit to gryznar/selenium that referenced this pull request May 17, 2025
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    2 participants