-
Notifications
You must be signed in to change notification settings - Fork 18.9k
chore(core): fix some docstrings (from DOC preview rule) #32833
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
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub. |
CodSpeed WallTime Performance ReportMerging #32833 will not alter performanceComparing
|
733f436
to
af98d4c
Compare
CodSpeed Instrumentation Performance ReportMerging #32833 will not alter performanceComparing Summary
|
cb42fec
to
985ec6a
Compare
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.
Pull Request Overview
This PR fixes docstrings to comply with a DOC preview rule by:
- Adding missing
Returns
sections to docstrings - Adding missing
Raises
sections to docstrings - Adding missing
Yields
sections to docstrings for generators - Removing duplicate/outdated docstrings to avoid redundancy
- Improving consistency in docstring formatting
Reviewed Changes
Copilot reviewed 87 out of 87 changed files in this pull request and generated 5 comments.
Show a summary per file
File | Description |
---|---|
libs/core/langchain_core/vectorstores/in_memory.py | Removed duplicate docstrings for add_documents methods |
libs/core/langchain_core/vectorstores/base.py | Removed incomplete Raises sections |
libs/core/langchain_core/utils/utils.py | Added Returns sections and fixed formatting |
libs/core/langchain_core/utils/pydantic.py | Added Returns sections to utility functions |
libs/core/langchain_core/utils/mustache.py | Changed Returns to Yields for generator and improved function descriptions |
libs/core/langchain_core/utils/loading.py | Added Returns section |
libs/core/langchain_core/utils/json_schema.py | Added Returns sections |
libs/core/langchain_core/utils/json.py | Added Returns section |
libs/core/langchain_core/utils/iter.py | Improved descriptions and added Returns/Yields sections |
libs/core/langchain_core/utils/interactive_env.py | Added Returns section |
libs/core/langchain_core/utils/function_calling.py | Added Raises sections |
libs/core/langchain_core/utils/env.py | Added Returns section |
libs/core/langchain_core/utils/aiter.py | Fixed descriptions and added Returns/Yields sections |
libs/core/langchain_core/tracers/schemas.py | Added Returns section |
libs/core/langchain_core/tracers/log_stream.py | Added comprehensive Args/Raises/Returns sections |
libs/core/langchain_core/tracers/langchain_v1.py | Added Raises sections for deprecated functions |
libs/core/langchain_core/tracers/langchain.py | Added Returns section and removed duplicate docstring |
libs/core/langchain_core/tracers/event_stream.py | Added Returns sections and removed duplicate docstrings |
libs/core/langchain_core/tracers/core.py | Added Args sections and improved descriptions |
libs/core/langchain_core/tracers/context.py | Added Raises section for deprecated function |
libs/core/langchain_core/tracers/base.py | Improved copy method descriptions |
libs/core/langchain_core/tools/* | Added comprehensive Args/Returns/Raises sections |
libs/core/langchain_core/stores.py | Added override decorators and removed redundant docstrings |
libs/core/langchain_core/runnables/* | Added Returns/Yields sections and improved consistency |
libs/core/langchain_core/* | Similar improvements across remaining files |
@@ -349,7 +354,7 @@ def _get_key( | |||
def_ldel: str, | |||
def_rdel: str, | |||
) -> Any: | |||
"""Get a key from the current scope.""" | |||
"""Return a key from the current scope.""" |
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.
[nitpick] The docstring should be 'Return the value of a key from the current scope' or 'Retrieve a key from the current scope' to be more accurate about what the function does.
"""Return a key from the current scope.""" | |
"""Return the value of a key from the current scope, or from the list of scopes if not found in the current one.""" |
Copilot uses AI. Check for mistakes.
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.
Not the purpose of this PR to improve the docstring texts.
Also this one would be too long for the summary first line.
53dd0e5
to
3c2eb01
Compare
Raises
sectionsReturns
sectionsYields
sections