Skip to content

Update 04_ik_allow_collision.py - #481

Merged
gonzalocasas merged 2 commits into
compas-dev:mainfrom
ardozcnn:main
Aug 13, 2026
Merged

Update 04_ik_allow_collision.py#481
gonzalocasas merged 2 commits into
compas-dev:mainfrom
ardozcnn:main

Conversation

@ardozcnn

Copy link
Copy Markdown
Contributor

This PR modernizes the IK collision example script by adopting Python f-strings, adding type annotations to the helper function, and incorporating clear docstrings to improve readability and code quality.

What type of change is this?

  • Bug fix in a backwards-compatible manner.
  • New feature in a backwards-compatible manner.
  • Breaking change: bug fix or new feature that involve incompatible API changes.
  • Other (e.g. doc update, configuration, etc)

Checklist

  • I added a line to the CHANGELOG.md file in the Unreleased section under the most fitting heading (e.g. Added, Changed, Removed).
  • I ran all tests on my computer and it's all green (i.e. invoke test).
  • I ran lint on my computer and there are no errors (i.e. invoke lint).
  • I added new functions/classes and made them available on a second-level import, e.g. compas_fab.robots.CollisionMesh.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added necessary documentation (if appropriate)

@gonzalocasas gonzalocasas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the contribution! Super appreciated!!!

I like the switch to f-strings! I would ask you to use the "single-import per line" thou (I think the linter is configured to enforce that), and I would actually keep the output text, because it helps a first time user to understand what to expect

@ardozcnn

Copy link
Copy Markdown
Contributor Author

Thank you for the feedback! I've updated the script to follow the single-import per line rule and restored the expected output docstring block at the bottom as requested.

@ardozcnn
ardozcnn requested a review from gonzalocasas August 13, 2026 20:53
@gonzalocasas

Copy link
Copy Markdown
Member

Awesome! Thanks!!!

@gonzalocasas
gonzalocasas merged commit 33273b0 into compas-dev:main Aug 13, 2026
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