← Back to Pull requests

Correct docstrings #10625

Closed
unknown closed this pull request without merging on Nov 25, 2026 23:25 UTC
View on GitHub
unknown unknown commented on Nov 25, 2026 04:02 UTC
Author

Preview: https://pillow--10625.org.readthedocs.build/en/10625/reference/index.html

Docstring changes only, no behaviour changes.

Wrong
Image.convert(): dither=None gives Floyd-Steinberg, not thresholding. It's Dither.NONE that thresholds.
ImageFilter.RankFilter: size size / 2 is a float and raises TypeError, so use //.
Image.frombuffer(): removes the paragraph about a warning and "bug" that no longer exist, and describes the default "raw" arguments.
Image.transform(): the ImageTransformHandler example now matches how it's called, transform(size, image, options).
ImageCms.buildTransform(): applyProfile() should be applyTransform(), and the attributes are input_mode/output_mode, not inMode/outMode.
ImageFile.PyEncoder.encode_to_file(): returns 1 on success, not 0.
ImageCms.createProfile(): a non-numeric colorTemp raises PyCMSError, not a non-positive one.
Image.quantize(): dither is only used when palette is given.
ImageOps.solarize(): pixels at or above the threshold are inverted.
ImageOps.fit(): an out-of-range bleed is treated as 0, rather than not allowed.

Incomplete
Image.getdata(): add .. deprecated:: 12.1.0, pointing to get_flattened_data().
Image.fromarray(): mention 16-bit unsigned integer pixels.
Image.save(): an unsupported format raises KeyError.
ImageFont.load(): document SyntaxError and TypeError.
ImageFont.load_default_imagefont(): add a docstring, since its reference entry was empty.
ImageText.Text.wrap(): document the ValueError cases, and that it modifies the object.
ImageCms: return types are ImageCmsProfile and ImageCmsTransform.

Rendering
ImageCms: the intent and direction lists rendered as a single run-on paragraph, with "(DEFAULT)" where there was no default and a reference to "the pyCMS documentation". These now refer to Intent and Direction, with the actual defaults.
ImageOps.pad(): the centering examples are now a list.

Typos: "can cannot", "decoding logic" in PyEncoder, "resize and crop" in pad(), "An Text", tobitmap() returning a string rather than bytes.

Diff: 272 lines (+204 / -68) across 3 files Reviewer: radarhere Review duration: 1162m
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.39) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.39 · 272 lines diff across 3 files
0.39
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.336
Shallow Review Depth shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #10625"
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: 39.5% (MEDIUM) · Higher = larger blast radius
39.5%
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: 17.1% · Safe to merge
17.1%