Skip to content

Commit 55a3e97

Browse files
committed
PR review resolutions
1 parent 3addf38 commit 55a3e97

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

python/python-core/src/main/python/domain/_annotations.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -654,6 +654,7 @@ def __init__(self, *,
654654
class DeepPlanningClone(JavaAnnotation):
655655
"""
656656
Marks an attribute as being required to be deep planning cloned.
657+
Not needed for `planning_solution` or `planning_entity` attributes because those are automatically deep cloned.
657658
This is especially useful for `list` (or `dict`) properties.
658659
Not needed for a `list` (or `dist`) attribute with a generic type of `planning_entity`,
659660
because those are automatically deep cloned.

python/python-core/tests/test_domain.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -957,7 +957,7 @@ class Solution:
957957

958958
def test_deep_clone_class():
959959
@deep_planning_clone
960-
@dataclass
960+
@dataclass(eq=False)
961961
class Code:
962962
value: str
963963
parent_entity: 'Entity' = field(default=None)
@@ -1019,3 +1019,4 @@ class Solution:
10191019
assert solution.score.score == 2
10201020
assert solution.entities[0].value == v1
10211021
assert solution.codes[0].parent_entity == solution.entities[0]
1022+
assert solution.codes[0] != e1.code

0 commit comments

Comments
 (0)