Skip to content

Commit 74ebf7f

Browse files
committed
Update comments in test file
1 parent ec949f2 commit 74ebf7f

File tree

1 file changed

+5
-7
lines changed
  • tests/pyreverse/functional/class_diagrams/aggregation

1 file changed

+5
-7
lines changed

tests/pyreverse/functional/class_diagrams/aggregation/fields.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,22 @@ class P:
44
pass
55

66
class A:
7-
x: P # just type hint, no ownership, so association
7+
x: P # just type hint, no ownership → Association
88

99
class B:
1010
def __init__(self, x: P):
11-
self.x = x # not instantiated, so aggregation
11+
self.x = x # receives object, not created → Aggregation
1212

1313
class C:
1414
x: P
15-
1615
def __init__(self, x: P):
17-
self.x = x # not instantiated, so aggregation
16+
self.x = x # receives object, not created → Aggregation
1817

1918
class D:
2019
x: P
21-
2220
def __init__(self):
23-
self.x = P() # instantiated, so composition
21+
self.x = P() # creates object → Composition
2422

2523
class E:
2624
def __init__(self):
27-
self.x = P() # instantiated, so composition
25+
self.x = P() # creates object → Composition

0 commit comments

Comments
 (0)