Skip to content

refactor: simplify contrib.bom.utils#1000

Merged
jkowalleck merged 2 commits into
mainfrom
refactor/simplify-contrib-bom-utils
Jun 17, 2026
Merged

refactor: simplify contrib.bom.utils#1000
jkowalleck merged 2 commits into
mainfrom
refactor/simplify-contrib-bom-utils

Conversation

@jkowalleck

Copy link
Copy Markdown
Member

No description provided.

Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
@jkowalleck jkowalleck requested a review from a team as a code owner June 11, 2026 12:39
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
@read-the-docs-community

read-the-docs-community Bot commented Jun 11, 2026

Copy link
Copy Markdown

Documentation build overview

📚 CycloneDX Python Library | 🛠️ Build #33093617 | 📁 Comparing 31b460c against latest (bdeaa91)

  🔍 Preview build  

1 file changed
± changelog.html

@codacy-production

codacy-production Bot commented Jun 11, 2026

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 4 complexity · 0 duplication

Metric Results
Complexity 4
Duplication 0

View in Codacy

🟢 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%)

View coverage diff in Codacy

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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 replacing map(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.

@jkowalleck jkowalleck merged commit 28b75bd into main Jun 17, 2026
54 checks passed
@jkowalleck jkowalleck deleted the refactor/simplify-contrib-bom-utils branch June 17, 2026 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants