SeleniumHQ / selenium

A browser automation framework and ecosystem.
https://selenium.dev
Apache License 2.0
29.73k stars 8.02k forks source link

Cleaned up Py doc sphinx warnings/errors and added README #14191

Open emanlove opened 4 days ago

emanlove commented 4 days ago

User description

Fixed Py documentation issues and added README focused on Py docs

Description

Types of changes

Checklist


PR Type

Bug fix, Documentation


Description


Changes walkthrough 📝

Relevant files
Bug fix
webdriver.py
Fix Sphinx warnings/errors in Chromium WebDriver docstrings

py/selenium/webdriver/chromium/webdriver.py
  • Fixed formatting issues in docstrings to resolve Sphinx
    warnings/errors.
  • Improved readability of docstring content.
  • +4/-5     
    print_page_options.py
    Correct spelling and formatting in PrintOptions docstrings

    py/selenium/webdriver/common/print_page_options.py
  • Corrected spelling errors in docstrings.
  • Fixed minor formatting issues in docstrings.
  • +2/-2     
    virtual_authenticator.py
    Fix indentation in VirtualAuthenticator docstrings             

    py/selenium/webdriver/common/virtual_authenticator.py
  • Fixed indentation issues in docstrings to resolve Sphinx
    warnings/errors.
  • +5/-5     
    relative_locator.py
    Improve readability and formatting in RelativeLocator docstrings

    py/selenium/webdriver/support/relative_locator.py
  • Added missing blank lines for better readability in docstrings.
  • Fixed minor formatting issues in docstrings.
  • +7/-6     
    Documentation
    README.rst
    Add README for Python documentation with build instructions

    py/docs/README.rst
  • Added new README file for Python documentation.
  • Included instructions for building and contributing to the
    documentation.
  • Listed known documentation issues and how to resolve them.
  • +71/-0   

    💡 PR-Agent usage: Comment /help on the PR to get a list of all available PR-Agent tools and their descriptions

    codiumai-pr-agent-pro[bot] commented 4 days ago

    PR Reviewer Guide 🔍

    ⏱️ Estimated effort to review [1-5] 2
    🧪 Relevant tests No
    🔒 Security concerns No
    ⚡ Key issues to review Spelling Error:
    In py/selenium/webdriver/common/virtual_authenticator.py, the word "intital" should be corrected to "initial".
    Consistency in Documentation:
    Ensure consistent formatting in documentation comments across all modified files. For example, the use of bullet points in argument descriptions should be consistently applied.
    codiumai-pr-agent-pro[bot] commented 4 days ago

    PR Code Suggestions ✨

    CategorySuggestion                                                                                                                                    Score
    Typo
    Correct a typo in the docstring for better clarity ___ **Correct the typo in the docstring from "intital" to "initial" for better clarity and
    professionalism.** [py/selenium/webdriver/common/virtual_authenticator.py [98]](https://github.com/SeleniumHQ/selenium/pull/14191/files#diff-5da367f7e3363010c619d8097422a270cd228eb9af198d8d4ee7482a0c647b66R98-R98) ```diff -- sign_count (int): intital value for a signature counter. +- sign_count (int): initial value for a signature counter. ``` - [ ] **Apply this suggestion**
    Suggestion importance[1-10]: 6 Why: The suggestion correctly identifies and fixes a typo in the docstring, which improves the professionalism of the documentation.
    6
    Correct a typo in the README documentation for better readability ___ **Correct the typo "contibuting" to "contributing" to improve the professionalism and
    readability of the documentation.** [py/docs/README.rst [67]](https://github.com/SeleniumHQ/selenium/pull/14191/files#diff-3e6e68d608cc87fb821961ccd6c289f57387ed9e94ace9e5165b2a40ef79a734R67-R67) ```diff -Some steps for contibuting to the Python documentation .. +Some steps for contributing to the Python documentation .. ``` - [ ] **Apply this suggestion**
    Suggestion importance[1-10]: 6 Why: This suggestion correctly identifies a typo in the README, which helps in maintaining the professionalism of the documentation.
    6
    Style
    Remove trailing whitespace to maintain code cleanliness ___ **Remove the trailing whitespace at the end of lines to maintain code cleanliness and adhere
    to style guidelines.** [py/selenium/webdriver/support/relative_locator.py [66-68]](https://github.com/SeleniumHQ/selenium/pull/14191/files#diff-f73abfa854ae95f9c23519655ed128023a74addb5460531a2e6476f0d3f4fb0dR66-R68) ```diff -+ elements = driver.find_elements(locate_with(By.CSS_SELECTOR, "p").above(lowest)) -+ ``` - [ ] **Apply this suggestion**
    Suggestion importance[1-10]: 5 Why: The suggestion is correct in aiming to remove unnecessary whitespace, which aligns with good coding practices, though it's a relatively minor improvement.
    5
    Readability
    Improve readability of the example dictionary in the docstring by using consistent spacing around colons ___ **The example dictionary in the docstring should use consistent spacing around the colons
    for better readability and to follow Python's PEP 8 style guide.** [py/selenium/webdriver/chromium/webdriver.py [82]](https://github.com/SeleniumHQ/selenium/pull/14191/files#diff-10fa59c3fd96a0c31762373ca8d7373c0ab669a437ae957b1a17ea1377b20608R82-R82) ```diff -For example: {'latency': 4, 'download_throughput': 2, 'upload_throughput': 2, 'offline': False} +For example: {'latency': 4, 'download_throughput': 2, 'upload_throughput': 2, 'offline': False} ``` - [ ] **Apply this suggestion**
    Suggestion importance[1-10]: 4 Why: The suggestion correctly identifies a minor style improvement in the docstring for readability. However, it's a low-impact change.
    4