Skip to content

Commit fd9b4e4

Browse files
committed
updated diagrams.py file
1 parent fff0be8 commit fd9b4e4

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

doc/whatsnew/fragments/10373.bugfix

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Fixed a bug in Pyreverse where aggregations and associations were included in diagrams regardless of the selected --filter-mode (such as PUB_ONLY, ALL, etc.).
2+
3+
closes #10373

pylint/pyreverse/diagrams.py

+6
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,9 @@ def extract_relationships(self) -> None:
237237
# associations & aggregations links
238238
for name, values in list(node.aggregations_type.items()):
239239
for value in values:
240+
if not self.show_attr(name):
241+
continue
242+
240243
self.assign_association_relationship(
241244
value, obj, name, "aggregation"
242245
)
@@ -249,6 +252,9 @@ def extract_relationships(self) -> None:
249252

250253
for name, values in associations.items():
251254
for value in values:
255+
if not self.show_attr(name):
256+
continue
257+
252258
self.assign_association_relationship(
253259
value, obj, name, "association"
254260
)

0 commit comments

Comments
 (0)