Reduce cyclomatic complexity in generate_query_data_node#912
Conversation
Deploying infrahub-sdk-python with
|
| Latest commit: |
28af520
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://ef295520.infrahub-sdk-python.pages.dev |
| Branch Preview URL: | https://pog-node-generate-query-data.infrahub-sdk-python.pages.dev |
| if insert_alias: | ||
| data[attr_name]["@alias"] = f"__alias__{self._schema.kind}__{attr_name}" | ||
| elif insert_alias: | ||
| if insert_alias: |
There was a problem hiding this comment.
Department of redundancy department.
Codecov Report❌ Patch coverage is
@@ Coverage Diff @@
## infrahub-develop #912 +/- ##
====================================================
- Coverage 81.04% 81.03% -0.01%
====================================================
Files 121 121
Lines 10644 10642 -2
Branches 1586 1583 -3
====================================================
- Hits 8626 8624 -2
+ Misses 1502 1501 -1
- Partials 516 517 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 4 files with indirect coverage changes 🚀 New features to boost your workflow:
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
WalkthroughRefactored relationship query-data generation in the node module by extracting a new static helper method 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Why
Reduce redundant code and make the code easier to read
What changed
and remove a redundant condition in the attribute alias branch, bringing
both async and sync methods from complexity 17 to 14 (ruff C901 limit).
Summary by CodeRabbit
Refactor
Chores