Skip to content

Fix invalid syntax (..., C=3, ...) ndarray: docstub fixes (VI).#8026

Merged
lagru merged 1 commit intoscikit-image:mainfrom
mkcor:docstub-fixes-VI
Jan 18, 2026
Merged

Fix invalid syntax (..., C=3, ...) ndarray: docstub fixes (VI).#8026
lagru merged 1 commit intoscikit-image:mainfrom
mkcor:docstub-fixes-VI

Conversation

@mkcor
Copy link
Copy Markdown
Member

@mkcor mkcor commented Jan 17, 2026

Description

This PR is orthogonal to all previous docstub-related PRs.

Here I have addressed the second-to-last item in the list of errors that docstub spits out (and a little more, i.e., (..., C=3, ...) array_like).

Checklist

Release note

For maintainers and optionally contributors, please refer to the instructions on how to document this PR for the release notes.

...

Summary by CodeRabbit

  • Documentation

    • Refined docstring formatting in color conversion functions with improved parameter and return value descriptions for enhanced clarity and consistency.
  • Chores

    • Updated type-checking configuration threshold in continuous integration workflow.

✏️ Tip: You can customize this high-level summary in your review settings.

@mkcor mkcor added 🔧 type: Maintenance Refactoring and maintenance of internals 🧩 typing Type annotations, type checking, and stubs labels Jan 17, 2026
@mkcor mkcor requested a review from lagru January 17, 2026 16:43
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Jan 17, 2026

📝 Walkthrough

Walkthrough

The PR adjusts the allowed-errors threshold in a GitHub Actions typing validation workflow from 947 to 895, and standardizes docstring type annotations in color conversion functions to use "array_like of shape (...)" format instead of the previous pattern.

Changes

Cohort / File(s) Summary
CI/CD Configuration
.github/workflows/typing.yml
Reduced allowed-errors threshold in docstub validation from 947 to 895
Documentation Updates
src/skimage/color/colorconv.py
Reformatted docstring parameter and return type annotations to consistently use "array_like of shape (...)" format across color conversion functions

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Poem

🐰 Docstrings dance in tidy rows,
"Array_like of shape" now glows,
Thresholds shift from 947 down,
Consistency crowns the whole town,
Cleaner docs, as CodeRabbit knows! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main changes: fixing invalid docstring syntax for type annotations in color conversion functions and updating the docstub configuration.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Member

@lagru lagru left a comment

Choose a reason for hiding this comment

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

Thanks

@lagru lagru merged commit 82c42e6 into scikit-image:main Jan 18, 2026
30 checks passed
@stefanv stefanv added this to the 0.27 milestone Jan 18, 2026
@mkcor mkcor deleted the docstub-fixes-VI branch January 18, 2026 14:48
mkcor added a commit that referenced this pull request Jan 19, 2026
## Description

Follows #8026, going through the list of docstub errors, from the bottom
up. Fixing similar errors in nearby lines in the same files along the
way.


## Checklist

<!-- Before pull requests can be merged, they should provide: -->

- A descriptive but concise pull request title
- [Docstrings for all
functions](https://github.com/numpy/numpydoc/blob/main/doc/example.py)
- [Unit
tests](https://scikit-image.org/docs/dev/development/contribute.html#testing)
- A gallery example in `./doc/examples` for new features
- [Contribution
guide](https://scikit-image.org/docs/dev/development/contribute.html) is
followed

## Release note

For maintainers and optionally contributors, please refer to the
[instructions](https://scikit-image.org/docs/stable/development/contribute.html#documenting-changes)
on how to document this PR for the release notes.

```release-note
...
```


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Documentation**
* Clarified parameter and attribute docs across feature-detection,
descriptor, measurement, and geometric-transformation APIs—replacing
vague “array”/“array-like” descriptions with explicit ndarray shape
specifications (e.g., shapes for images, keypoints, scales,
orientations, descriptors, positions, residuals). These updates improve
consistency and make expected input/output shapes clearer in public
documentation.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Lars Grüter <lagru@mailbox.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🧩 typing Type annotations, type checking, and stubs 🔧 type: Maintenance Refactoring and maintenance of internals

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants