refactor: simplify contrib.bom.utils#1000
Conversation
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Documentation build overview
|
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 4 |
| Duplication | 0 |
🟢 Coverage 100.00% diff coverage · +0.00% coverage variation
Metric Results Coverage variation ✅ +0.00% coverage variation Diff coverage ✅ 100.00% diff coverage (80.00%) Coverage variation details
Coverable lines Covered lines Coverage Common ancestor commit (d0e10ca) 6079 5729 94.24% Head commit (31b460c) 6079 (+0) 5729 (+0) 94.24% (+0.00%) Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch:
<coverage of head commit> - <coverage of common ancestor commit>Diff coverage details
Coverable lines Covered lines Diff coverage Pull request (#1000) 2 2 100.00% Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified:
<covered lines added or modified>/<coverable lines added or modified> * 100%
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
There was a problem hiding this comment.
Pull request overview
Refactors cyclonedx.contrib.bom.utils to simplify a few internal implementation details while keeping the public utilities (BomRefDiscriminator, BomDependencyGraphFlatMerger) functionally equivalent.
Changes:
- Reformatted
__all__into a multi-line list for readability. - Simplified
BomRefDiscriminator.from_bom()by replacingmap(lambda ...)with generator expressions. - Simplified a local variable initialization in
_flatten_merge()(seen).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.