Skip to content

Fix mutable default in configclass fallback (no-IsaacLab path) - #10

Merged
kouroshD merged 1 commit into
AccelerationConsortium:mainfrom
lanafi00:fix-mutable-default-configclass
Aug 28, 2026
Merged

Fix mutable default in configclass fallback (no-IsaacLab path)#10
kouroshD merged 1 commit into
AccelerationConsortium:mainfrom
lanafi00:fix-mutable-default-configclass

Conversation

@lanafi00

Copy link
Copy Markdown
Contributor

Description

matterix_sm is supposed to work without Isaac Lab installed, using the fallback configclass in _compat.py. Right now it crashes on import because two fields use a mutable default (= []) instead of field(default_factory=list):

  • primitive_actions/semantic_action.py
  • primitive_actions/wait.py

The dataclasses module doesn't allow mutable defaults (Isaac Lab's own configclass apparently handles this, but the fallback doesn't). Fixed both to use default_factory, matching the pattern already used in semantic_info.py. Imported field from dataclasses in both files.

Tested that import matterix_sm works standalone after the fix (HAS_ISAACLAB=False).

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I have run the pre-commit checks with <FULL_PATH_TO_ISAACLAB>/isaaclab.sh --format
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • I have updated the changelog and the corresponding version in the extension's config/extension.toml file
  • I have added my name to the CONTRIBUTORS.md or my name already exists there

@lanafi00
lanafi00 requested a review from kouroshD as a code owner August 28, 2026 18:35
@kouroshD
kouroshD merged commit 51f2070 into AccelerationConsortium:main Aug 28, 2026
@kouroshD

Copy link
Copy Markdown
Collaborator

Thanks, merged.

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