Repository navigation
Conversation
- RedisPersistentUserManager.__init__ takes host/port/password/db/ decode_responses; the docstring's 'user_id' entry is a leftover - concat_original_source takes graph_results/rerank_source; the docstring documented 'merge_field' (a local variable) and omitted rerank_source
Collaborator
🤖 Open Code ReviewTarget: PR #2392 ✅ OpenCodeReview: Review complete: 0 finding(s) across 2 selected item(s). Generated by cloud-assistant via Open Code Review. |
Collaborator
✅ Automated Test Results: PASSEDAll tests passed (3/3 executed). memos_python_core/changed-python-source: 3/3. Duration: 8s Branch: |
Contributor
|
This PR has been automatically marked as stale due to inactivity. |
RerankerGuo
added a commit
to RerankerGuo/MemOS
that referenced
this pull request
Oct 27, 2026
…#2392) Two public docstrings documented parameters that the AST no longer exposes: 1. `RedisPersistentUserManager.__init__` listed `user_id (str, optional):` as the first Args entry, but the signature is `(host, port, password, db, decode_responses)` — `user_id` is a leftover from an earlier API. Removed the phantom line. 2. `concat_original_source` listed `merge_field (List[str]): List of fields to merge`, which is actually a local variable inside the function, and omitted the real `rerank_source` parameter (the comma-separated metadata field names that the function actually accepts). Rewrote the docstring with both `graph_results` and `rerank_source` documented, with their actual semantics. To prevent the same kind of drift from sneaking back in, this commit also adds tests/test_docstring_signature_parity.py: it parses each function's source file, extracts the parameter list from the AST, extracts the `Args:` block parameter names from the docstring, and asserts the two sets match. The check works around the `@require_python_package` decorator that rewrites `__code__`, so it sees the real `__init__` signature rather than the wrapper's. Docs-only functional change; the parity test is the regression guard. Fixes MemTensor#2392.
RerankerGuo
added a commit
to RerankerGuo/MemOS
that referenced
this pull request
Nov 4, 2026
…#2392) Two public docstrings documented parameters that the AST no longer exposes: 1. `RedisPersistentUserManager.__init__` listed `user_id (str, optional):` as the first Args entry, but the signature is `(host, port, password, db, decode_responses)` — `user_id` is a leftover from an earlier API. Removed the phantom line. 2. `concat_original_source` listed `merge_field (List[str]): List of fields to merge`, which is actually a local variable inside the function, and omitted the real `rerank_source` parameter (the comma-separated metadata field names that the function actually accepts). Rewrote the docstring with both `graph_results` and `rerank_source` documented, with their actual semantics. To prevent the same kind of drift from sneaking back in, this commit also adds tests/test_docstring_signature_parity.py: it parses each function's source file, extracts the parameter list from the AST, extracts the `Args:` block parameter names from the docstring, and asserts the two sets match. The check works around the `@require_python_package` decorator that rewrites `__code__`, so it sees the real `__init__` signature rather than the wrapper's. Docs-only functional change; the parity test is the regression guard. Fixes MemTensor#2392.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
AST-verified mismatches:
Docs-only change.
Related Issue: N/A (docs-only fix)