Skip to content

docs: fix swapped preserve_order descriptions in resolve_matching_names docstrings#5546

Merged
kellyguo11 merged 1 commit into
isaac-sim:mainfrom
dashitongzhi:fix/docstring-preserve-order-swap
May 28, 2026
Merged

docs: fix swapped preserve_order descriptions in resolve_matching_names docstrings#5546
kellyguo11 merged 1 commit into
isaac-sim:mainfrom
dashitongzhi:fix/docstring-preserve-order-swap

Conversation

@dashitongzhi
Copy link
Copy Markdown
Contributor

Description

Fixes #5146

The docstrings for both resolve_matching_names and resolve_matching_names_values in source/isaaclab/isaaclab/utils/string.py had the descriptions for preserve_order=True and preserve_order=False swapped.

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 inside if preserve_order:)

The fix swaps the prose descriptions to match the actual code behavior and the provided examples.

Type of change

  • Documentation fix (non-breaking change which fixes a docstring)

Checklist

  • I have checked that there is no similar PR
  • The code examples in the docstrings are correct and unchanged

…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
Copilot AI review requested due to automatic review settings May 8, 2026 15:37
@github-actions github-actions Bot added bug Something isn't working isaac-lab Related to Isaac Lab team labels May 8, 2026
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 8, 2026

Greptile Summary

This PR fixes an inverted docstring in source/isaaclab/isaaclab/utils/string.py where the preserve_order=True and preserve_order=False descriptions were swapped in both resolve_matching_names and resolve_matching_names_values. The corrected descriptions now match the actual code logic and the provided examples.

  • resolve_matching_names: Description for preserve_order=False (target-string order) and preserve_order=True (query-key order) are now correct.
  • resolve_matching_names_values: Same swap applied — both functions now have accurate, consistent documentation.

Confidence Score: 5/5

Safe 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

Filename Overview
source/isaaclab/isaaclab/utils/string.py Swaps the swapped preserve_order=True/False descriptions in docstrings for resolve_matching_names and resolve_matching_names_values to match actual code behavior.

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]
Loading

Reviews (1): Last reviewed commit: "docs: fix swapped preserve_order descrip..." | Re-trigger Greptile

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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=True vs preserve_order=False descriptions in resolve_matching_names docstring.
  • Swapped the preserve_order=True vs preserve_order=False descriptions in resolve_matching_names_values docstring.

💡 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.
@dashitongzhi
Copy link
Copy Markdown
Contributor Author

Friendly ping for review 🙏 This is a small, focused fix. CI is passing. Thank you!

@dashitongzhi
Copy link
Copy Markdown
Contributor Author

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!

@kellyguo11 kellyguo11 merged commit 3cf5406 into isaac-sim:main May 28, 2026
13 of 17 checks passed
kellyguo11 added a commit that referenced this pull request May 28, 2026
# 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
kellyguo11 added a commit to kellyguo11/IsaacLab-public that referenced this pull request May 28, 2026
# 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug Report] resolve_matching_names (and resolve_matching_names_values) docstring has preserve_order=True/False descriptions swapped

3 participants