refactor(core): improve docstrings for HTML link extraction utilities #34550
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
refactor(core): improve docstrings for HTML link extraction utilities
Description
This PR updates and clarifies the docstrings for
find_all_linksandextract_sub_linksinlibs/core/langchain_core/utils/html.py.The previous return-value descriptions were vague (e.g., "all links", "sub links"). They have now been revised to clearly describe the behavior and output of each function:
These improvements make the utilities more understandable and developer-friendly without altering functionality.
Verification
ruff check libs/core/langchain_core/utils/html.py: Passedpytest libs/core/tests/unit_tests/utils/test_html.py: PassedChecklists
TYPE(SCOPE): DESCRIPTIONlangchain-corepackagemake format,make lint, andmake testpass