-
-
Notifications
You must be signed in to change notification settings - Fork 306
wip fix: unsupported types in request body #1243
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
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub.
|
for more information, see https://pre-commit.ci
assert response.status_code == 200 | ||
result = response.json() | ||
|
||
# Check that the array was parsed as a list |
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.
This comment simply restates what the next line of code does (assert result["type"] == "list"
). According to the effective comments rule, comments should not state the obvious or merely restate what the code is doing. The assertion itself is clear enough to understand without this redundant comment.
🔍 This comment matches your effective_comments.mdc
rule.
# Check that the array was parsed as a list | |
React with 👍 to tell me that this comment was useful, or 👎 if not (and I'll stop posting more comments like this in the future)
assert response.status_code == 200 | ||
result = response.json() | ||
|
||
# Check that the object was parsed as a dict |
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.
This comment simply restates what the next line of code does (assert result["type"] == "dict"
). According to the effective comments rule, comments should not state the obvious or merely restate what the code is doing. The assertion itself clearly shows we're checking if the object was parsed as a dict.
🔍 This comment matches your effective_comments.mdc
rule.
# Check that the object was parsed as a dict | |
React with 👍 to tell me that this comment was useful, or 👎 if not (and I'll stop posting more comments like this in the future)
result = response.json() | ||
|
||
# Check type | ||
assert result["type"] == expected_type, f"Expected {expected_type} but got {result['type']} for data {test_data}" |
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.
This comment is redundant as it merely states what the next line of code does (checking the type with an assertion). The assertion itself clearly indicates we're checking the type, making the comment unnecessary according to the effective comments rule.
🔍 This comment matches your effective_comments.mdc
rule.
React with 👍 to tell me that this comment was useful, or 👎 if not (and I'll stop posting more comments like this in the future)
# Check type | ||
assert result["type"] == expected_type, f"Expected {expected_type} but got {result['type']} for data {test_data}" | ||
|
||
# Check data integrity |
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.
This comment restates what the next line of code does (assert result["data"] == test_data
). The assertion itself clearly shows we're checking data integrity by comparing the result data with the test data. According to the effective comments rule, comments should not merely restate what is obvious from the code.
🔍 This comment matches your effective_comments.mdc
rule.
# Check data integrity | |
React with 👍 to tell me that this comment was useful, or 👎 if not (and I'll stop posting more comments like this in the future)
# Check data integrity | ||
assert result["data"] == test_data, f"Data integrity failed for {test_data}" | ||
|
||
# Check specific type flags |
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.
This comment simply describes what the following loop is doing, which is already clear from the code itself. The loop iterates through expected_checks and verifies each one with assertions. According to the effective comments rule, comments should not restate what is obvious from reading the code.
🔍 This comment matches your effective_comments.mdc
rule.
# Check specific type flags |
React with 👍 to tell me that this comment was useful, or 👎 if not (and I'll stop posting more comments like this in the future)
CodSpeed Performance ReportMerging #1243 will not alter performanceComparing Summary
Footnotes |
Description
This PR fixes #
Summary
This PR does....
PR Checklist
Please ensure that:
Pre-Commit Instructions:
Review by RecurseML
🔍 Review performed on ffb7ebc..83e1ed5
✅ Files analyzed, no issues (2)
•
integration_tests/base_routes.py
•
src/types/request.rs