Skip to content

docs: point docstring parameters at the arguments the signatures accept - #8440

Open
lxcxjxhx wants to merge 1 commit into
livekit:mainfrom
lxcxjxhx:docs/stale-docstring-args
Open

lxcxjxhx wants to merge 1 commit into
livekit:mainfrom
lxcxjxhx:docs/stale-docstring-args

Conversation

@lxcxjxhx

@lxcxjxhx lxcxjxhx commented Nov 7, 2026

Copy link
Copy Markdown

What

Four docstrings name a parameter that the function below them does not accept. No runtime change: the signatures stay exactly as they are, only the prose is corrected.

File Docstring names Actual parameter
livekit-agents/livekit/agents/tokenize/utils.py words replacements
livekit-plugins/livekit-plugins-google/.../realtime/realtime_api.py tools tool_behavior, tool_response_scheduling
livekit-plugins/livekit-plugins-ultravox/.../realtime/realtime_model.py model_id model
livekit-plugins/livekit-plugins-upliftai/.../tts.py sample_rate (no such argument; the class passes DEFAULT_SAMPLE_RATE to tts.TTS itself)

How this was found

A small AST check over Args: / numpydoc Parameters blocks that reports documentation entries whose name is not an argument of the enclosing function. Each hit was then read by hand against the signature; the four above are the ones that survived, i.e. where the body does not read the name back out of **kwargs and there is no overload union hiding it.

Notes on the individual edits

  • replace_words: the body already uses replacements, so words in the docstring is a rename leftover.
  • update_options (google realtime): the two parameters were added with the tool-behaviour work and are already documented with this wording on RealtimeModel.__init__ in the same file, so the wording is copied from there rather than invented.
  • Ultravox RealtimeModel.__init__: only the first Parameters entry is wrong; the remaining entries match the signature.
  • Uplift TTS.__init__: the sample_rate entry is deleted rather than reworded, because the argument is not part of this constructor at all — the class forwards DEFAULT_SAMPLE_RATE to the base class.

Verification

  • ruff check and ruff format --check on the four touched files: clean.
  • git diff --stat: 4 files, 4 insertions, 4 deletions.
  • No signature, default, or behaviour touched; pdoc output for these symbols gains no new section.

Deliberately not touched

The same check reported nothing else in the four packages above, so the diff stays at these four docstrings. If you would rather have one pass over all of livekit-plugins in a single PR, say so and I will rerun it there instead.

@lxcxjxhx
lxcxjxhx requested a review from a team as a code owner November 7, 2026 13:01
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@devin-ai-integration devin-ai-integration 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.

🔍 Devin Review: 1 flag

Not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)

Devin Review

This branch has not been deployed

No deployments
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