← Back to Pull requests

Fix missing comma in `cucim.core.operations.color.__all__` #1158

Closed
unknown closed this pull request without merging on Nov 09, 2026 22:04 UTC
View on GitHub
unknown unknown commented on Sep 13, 2026 04:25 UTC
Author

Description

cucim.core.operations.color.__all__ is missing a comma between two entries:

__all__ = [
    "color_jitter",
    "rand_color_jitter" "absorbance_to_image",   # implicit string concatenation
    ...
]

Python concatenates the adjacent literals into the single name "rand_color_jitterabsorbance_to_image", which does not exist in the module. As a result:

  • from cucim.core.operations.color import raises

  • AttributeError: module 'cucim.core.operations.color' has no attribute 'rand_color_jitterabsorbance_to_image'
  • neither rand_color_jitter nor absorbance_to_image is part of the advertised public API (docs / help() / tooling reading __all__).
  • Explicit imports (from cucim.core.operations.color import rand_color_jitter) are unaffected, which is why this has gone unnoticed.

    This PR splits the entry back into the two intended names. No other changes.

    Verification

    I don't have a CUDA build of cuCIM set up here, so I verified the package with cupy/numpy stubbed out (only the module-level import machinery matters for this bug):

  • before: from <color pkg> import → AttributeError ... 'rand_color_jitterabsorbance_to_image'

  • after: star-import succeeds and exports absorbance_to_image, color_jitter, image_to_absorbance, normalize_colors_pca, rand_color_jitter, stain_extraction_pca
  • Checklist


  • I am familiar with the Contributing Guidelines.

  • New or existing tests cover these changes. (one-line __all__ fix; happy to add a star-import smoke test if you'd like)

  • The documentation is up to date with these changes.
  • 🤖 Generated with Claude Code

    Diff: 217 lines (+162 / -55) across 2 files Reviewer: gigony Review duration: 83139m
    All Vouch review confidence checks passed
    Residual risk 0.16 = Change Risk (0.37) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.37 · 217 lines diff across 2 files
    0.37
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    56%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.322
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #1158"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 56.8% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 36.7% (MEDIUM) · Higher = larger blast radius
    36.7%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 56.8% · Lower = rushed or shallow review
    56.8%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 15.9% · Safe to merge
    15.9%
    Repository