Skip to content

docs: fix stale Args in EmbeddingsRegistry.register_model docstring#635

Open
FBISiri wants to merge 1 commit into
feyninc:devfrom
FBISiri:docs/fix-register-model-docstring
Open

docs: fix stale Args in EmbeddingsRegistry.register_model docstring#635
FBISiri wants to merge 1 commit into
feyninc:devfrom
FBISiri:docs/fix-register-model-docstring

Conversation

@FBISiri

@FBISiri FBISiri commented Jul 16, 2026

Copy link
Copy Markdown

What

EmbeddingsRegistry.register_model() accepts only (name, embedding_cls), but its docstring documents two extra parameters that don't exist on the method:

@classmethod
def register_model(cls, name: str, embedding_cls: type[BaseEmbeddings]) -> None:
    """Register a new embeddings implementation.

    Args:
        name: Unique identifier for this implementation
        embedding_cls: The embeddings class to register
        pattern: Optional regex pattern string or compiled pattern          # <- not a parameter
        supported_types: Optional list of types that the embeddings class supports  # <- not a parameter
    """

pattern and supported_types belong to the sibling classmethods register_pattern() and register_types(), which were split out into their own methods. The register_model() docstring was left describing the old combined signature.

This PR removes the two stale Args entries so the docstring matches the actual signature.

Why

The docstring is the public API reference (and feeds the generated docs). Documenting non-existent pattern / supported_types arguments misleads users into passing kwargs that raise TypeError, and trips docstring/signature consistency checks.

How verified

  • register_pattern() / register_types() confirmed as the real homes of these parameters (same file).
  • ruff check src/chonkie/embeddings/registry.pyAll checks passed!
  • Documentation-only change: no code behavior changes, no tests affected.

Scope

Small and self-contained — a 2-line docstring correction in a single file. No behavior change.

register_model() only accepts (name, embedding_cls), but its docstring
also documented 'pattern' and 'supported_types' parameters that do not
exist on the method. Those belong to the separate register_pattern() and
register_types() classmethods. Remove the two stale Args entries so the
docstring matches the actual signature.
@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 8047e0a7-5f51-4ff4-adbd-9ce2666d3891

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request updates the docstring for the register_model method in src/chonkie/embeddings/registry.py by removing the documentation for the pattern and supported_types arguments, which are no longer part of the function signature. I have no feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

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.

1 participant