Skip to content

Conversation

@NeoZhangJianyu
Copy link
Contributor

@NeoZhangJianyu NeoZhangJianyu commented Nov 5, 2025

User description

Type of Change

bug

Description

fix version in html

How has this PR been tested?

test locally.

Dependency Change?

NA


PR Type

Bug fix, Enhancement


Description

  • Fix version link HTML structure

  • Add debug print for script arguments


Diagram Walkthrough

flowchart LR
  A["Fix version link"] -- "Update HTML structure" --> B["Add debug print"]
Loading

File Walkthrough

Relevant files
Bug fix
update_html.py
Update version link and add debug print                                   

docs/build_docs/update_html.py

  • Update key_str to include role="search"
  • Modify version_list to include additional role="search" div
  • Add print statement for script arguments
+5/-3     
Formatting
api_2.rst
Add newline at EOF                                                                             

docs/source/api-doc/api_2.rst

  • Add newline at end of file
+1/-0     

@PRAgent4INC
Copy link
Collaborator

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

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

Incorrect String Formatting

The key_str variable is incorrectly formatted. It uses .format(version) but version is not used in the string.

key_str = '<div role="search">\n'.format(version)
Duplicate Code

The key_str and version_list strings are duplicated with slight differences. Consider refactoring to avoid redundancy.

        key_str = '<div role="search">\n'.format(version)
        version_list = """            <div class="version">
              <a href="{}versions.html">{}▼</a>
              <p>Click link above to switch version</p>
            </div>
<div role="search">\n""".format(
            index_path, folder_name

@PRAgent4INC
Copy link
Collaborator

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
General
Remove debug print

Remove the debug print statement before merging.

docs/build_docs/update_html.py [101]

-    print(f"run {sys.argv[0]} {sys.argv[1]} {sys.argv[2]}")
 
+
Suggestion importance[1-10]: 5

__

Why: The suggestion correctly identifies a debug print statement that should be removed before merging. This is a minor improvement that enhances code cleanliness.

Low

@chensuyue chensuyue merged commit 722d41b into master Nov 5, 2025
11 checks passed
@chensuyue chensuyue deleted the jianyuzh_fix_version branch November 5, 2025 05:08
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.

5 participants