Skip to content

Fix outdated solve() example in the kinematics module docstring#16

Merged
gunyarakun merged 1 commit into
mainfrom
fix-docstring
Jul 15, 2026
Merged

Fix outdated solve() example in the kinematics module docstring#16
gunyarakun merged 1 commit into
mainfrom
fix-docstring

Conversation

@gunyarakun

Copy link
Copy Markdown
Contributor

The Usage example in the kinematics.py module docstring still showed the old solver API:

kin = Kinematics(setup, IKParams())
result = kin.solve(dt=0.1, n_iters=5)

Kinematics.solve() takes no arguments. The integration timestep and the iteration count are configured on IKParams instead, as dt and max_iters (not n_iters), and are read by _IKSolver at construction time. Copying the
example as written would raise a TypeError.

Updated to match the current API:

kin = Kinematics(setup, IKParams(dt=0.1, max_iters=5))
result = kin.solve()

Docstring only, no behavior change.

@gunyarakun
gunyarakun requested a review from lescidium July 15, 2026 10:32

@lescidium lescidium 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.

LGTM!

@gunyarakun
gunyarakun merged commit 802cf15 into main Jul 15, 2026
8 checks passed
@gunyarakun
gunyarakun deleted the fix-docstring branch July 15, 2026 10:37
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