Merge pull request #409 from tomprimozic/patch-1

Fix "mutable default is not allowed"
This commit is contained in:
Balakumar Sundaralingam
2024-11-16 18:31:31 -08:00
committed by GitHub

View File

@@ -14,7 +14,7 @@ from __future__ import annotations
# Standard Library # Standard Library
from abc import abstractmethod, abstractproperty from abc import abstractmethod, abstractproperty
from dataclasses import dataclass from dataclasses import dataclass, field
from typing import Dict, List, Optional, Sequence from typing import Dict, List, Optional, Sequence
# Third Party # Third Party
@@ -91,7 +91,7 @@ class Goal(Sequence):
name: str = "goal" name: str = "goal"
goal_state: Optional[State] = None goal_state: Optional[State] = None
goal_pose: Pose = Pose() goal_pose: Pose = field(default_factory=Pose)
links_goal_pose: Optional[Dict[str, Pose]] = None links_goal_pose: Optional[Dict[str, Pose]] = None
current_state: Optional[State] = None current_state: Optional[State] = None
retract_state: Optional[T_DOF] = None retract_state: Optional[T_DOF] = None