Open
Conversation
Contributor
Author
|
🧪 Testing To try out this version of the SDK: Expires at: Sat, 11 Apr 2026 20:23:14 GMT |
|
|
||
|
|
||
| class ConnectionDeleteByIDParams(TypedDict, total=False): | ||
| delete_documents: Annotated[str, PropertyInfo(alias="deleteDocuments")] |
There was a problem hiding this comment.
Bug: The delete_documents parameter is incorrectly typed as str instead of bool. This contradicts its documented behavior and will cause type-checking and serialization errors.
Severity: MEDIUM
Suggested Fix
Change the type annotation for the delete_documents parameter from str to bool in connection_delete_by_id_params.py and any related function signatures, such as in connections.py. The type should be Annotated[bool, PropertyInfo(alias="deleteDocuments")].
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: src/supermemory/types/connection_delete_by_id_params.py#L13
Potential issue: The `delete_documents` parameter in `connection_delete_by_id_params.py`
is typed as `str`, but its docstring ("Whether to also delete documents... Defaults to
true.") and intended function indicate it should be a boolean. This incorrect type hint
will cause type checkers to flag correct usage (passing `True` or `False`) as an error.
Furthermore, if a user passes a Python boolean, the SDK's serialization may produce an
incorrect value (e.g., `"True"` instead of the expected `"true"`), leading to API
failures. This is inconsistent with other boolean parameters in the codebase, such as
`include_content`.
Did we get this right? 👍 / 👎 to inform future reviews.
1ba27f5 to
dcc45b5
Compare
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.
Automated Release PR
3.29.0 (2026-03-12)
Full Changelog: v3.28.0...v3.29.0
Features
This pull request is managed by Stainless's GitHub App.
The semver version number is based on included commit messages. Alternatively, you can manually set the version number in the title of this pull request.
For a better experience, it is recommended to use either rebase-merge or squash-merge when merging this pull request.
🔗 Stainless website
📚 Read the docs
🙋 Reach out for help or questions