docs: fix swapped preserve_order descriptions in resolve_matching_names docstrings#5546
Conversation
…es docstrings The docstrings for both resolve_matching_names and resolve_matching_names_values had the descriptions for preserve_order=True and preserve_order=False swapped. The actual code behavior and examples were correct, but the prose descriptions were inverted. Fixes isaac-sim#5146
Greptile SummaryThis PR fixes an inverted docstring in
Confidence Score: 5/5Safe to merge — only docstring text is changed; no logic, behaviour, or interface is modified. The change corrects two mirrored documentation errors. The actual implementation and all examples in the docstrings were already correct; only the prose descriptions for preserve_order=True and preserve_order=False were swapped. Reading the code confirms the fix is accurate for both functions. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[resolve_matching_names / resolve_matching_names_values called] --> B{preserve_order?}
B -- False default --> C[Return matches in target-string list order]
B -- True --> D[Reorder results to follow query-key order]
Reviews (1): Last reviewed commit: "docs: fix swapped preserve_order descrip..." | Re-trigger Greptile |
There was a problem hiding this comment.
Pull request overview
Fixes incorrect docstring descriptions for the preserve_order parameter in resolve_matching_names and resolve_matching_names_values so the prose matches the functions’ actual ordering behavior.
Changes:
- Swapped the
preserve_order=Truevspreserve_order=Falsedescriptions inresolve_matching_namesdocstring. - Swapped the
preserve_order=Truevspreserve_order=Falsedescriptions inresolve_matching_names_valuesdocstring.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| If the :attr:`preserve_order` is False, the ordering of the matched indices and names is the same as the order | ||
| If the :attr:`preserve_order` is True, the ordering of the matched indices and names is the same as the order | ||
| of the provided list of query regular expressions. |
|
Friendly ping for review 🙏 This is a small, focused fix. CI is passing. Thank you! |
|
Hi! 👋 This PR has passed all CI checks and looks ready for review. Could a maintainer please take a look when they have a chance? Thank you! |
# Description Merge changes from main branch: - #4875 - Adds Isaac-Stack-Cube-Franka-IK-Rel-v0 task variants - #4909 - Updates minor RSL-RL configclass docstring - #4934 - Updates Newton docs on main for 3.0 beta changes - #5182 - Fix flatdict version pin to allow 4.1.0+ - #5195 - Add NCCL troubleshooting notes - #5406 - Updates doc building job on main to match develop - #5311 - Update skrl integration for version 2.0.0 - #5482 - Adds nightly-changelog.yml on main - #5527 - Use isaaclab-bot GitHub App token for nightly changelog push - #5537 - Address deprecation warnings in nightly changelog workflow - #5746 - Fix .dockerignore for _isaac_sim symlink - #5745 - Parameterize nightly compile over configurable branches - #5546 - Fix swapped preserve_order docstrings - #5817 - Update skrl agent configurations in the Isaac Lab template
# Description Merge changes from main branch: - isaac-sim#4875 - Adds Isaac-Stack-Cube-Franka-IK-Rel-v0 task variants - isaac-sim#4909 - Updates minor RSL-RL configclass docstring - isaac-sim#4934 - Updates Newton docs on main for 3.0 beta changes - isaac-sim#5182 - Fix flatdict version pin to allow 4.1.0+ - isaac-sim#5195 - Add NCCL troubleshooting notes - isaac-sim#5406 - Updates doc building job on main to match develop - isaac-sim#5311 - Update skrl integration for version 2.0.0 - isaac-sim#5482 - Adds nightly-changelog.yml on main - isaac-sim#5527 - Use isaaclab-bot GitHub App token for nightly changelog push - isaac-sim#5537 - Address deprecation warnings in nightly changelog workflow - isaac-sim#5746 - Fix .dockerignore for _isaac_sim symlink - isaac-sim#5745 - Parameterize nightly compile over configurable branches - isaac-sim#5546 - Fix swapped preserve_order docstrings - isaac-sim#5817 - Update skrl agent configurations in the Isaac Lab template
Description
Fixes #5146
The docstrings for both
resolve_matching_namesandresolve_matching_names_valuesinsource/isaaclab/isaaclab/utils/string.pyhad the descriptions forpreserve_order=Trueandpreserve_order=Falseswapped.Current (incorrect) docstring:
preserve_order=True→ "ordering is dictated by the order of the target strings"preserve_order=False→ "ordering is the same as the order of the provided list of query regular expressions"Actual code behavior (and examples):
preserve_order=False→ target list order (default, no reordering)preserve_order=True→ query keys order (reordering occurs insideif preserve_order:)The fix swaps the prose descriptions to match the actual code behavior and the provided examples.
Type of change
Checklist