MPT-18065 Fix backward incompatible issues related to RQL: Support of property comparison#210
MPT-18065 Fix backward incompatible issues related to RQL: Support of property comparison#210
Conversation
📝 WalkthroughWalkthroughAdds automatic single-quote quoting (with escaping) for RQL literal values and exposes a new helper Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
tests/unit/rql/query_builder/test_rql_dot_path.py (1)
33-34: Remove unusednoqadirectives.Static analysis indicates that
FBT003is not enabled in the linting configuration, making thesenoqacomments unnecessary.🧹 Suggested cleanup
- assert str(result(True)) == f"{op}(asset.id,'true')" # noqa: FBT003 - assert str(result(False)) == f"{op}(asset.id,'false')" # noqa: FBT003 + assert str(result(True)) == f"{op}(asset.id,'true')" + assert str(result(False)) == f"{op}(asset.id,'false')"
66dfc76 to
51fd78e
Compare
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@mpt_api_client/rql/query_builder.py`:
- Line 18: The trailing noqa comment on the parse_kwargs function signature is
invalid/unused; edit the parse_kwargs definition (function name: parse_kwargs)
to remove the "# noqa: WPS231 C901" directive so linters (ruff/flake8) can apply
configured rules correctly, then run the linting suite to confirm no remaining
rule suppressions are needed or add specific, valid noqa codes only if genuinely
required and documented.
In `@tests/unit/rql/query_builder/test_rql_dot_path.py`:
- Around line 32-34: The two assertions in test_rql_dot_path.py that read assert
str(result(True)) == f"{op}(asset.id,'true')" # noqa: FBT003 and assert
str(result(False)) == f"{op}(asset.id,'false')" # noqa: FBT003 should have the
unused noqa directives removed; edit the test to drop the " # noqa: FBT003"
suffixes so the lines are simply the assertions using result and op, leaving
other lines untouched.
51fd78e to
fef2043
Compare
fef2043 to
455cf38
Compare
|
There was a problem hiding this comment.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In `@tests/unit/rql/query_builder/test_rql_dot_path.py`:
- Around line 28-34: Remove the unused per-line noqa suppressions in the test
function test_dotted_path_comp_bool_and_str: delete the "# noqa: FBT003"
comments on the two boolean assertions so the file no longer contains
ineffective FBT003 suppressions; locate this in the test where result =
getattr(RQLQuery().asset.id, op) and the subsequent assert str(result(True)) and
assert str(result(False)) lines and simply remove the trailing noqa tokens.



Closes MPT-18065