Skip to content

Commit

Permalink
'Refactored by Sourcery'
Browse files Browse the repository at this point in the history
  • Loading branch information
Sourcery AI committed Jul 19, 2020
1 parent 188bee6 commit 5da7549
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions gaphor/SysML/blocks/connectors.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,8 @@ def connect_subject(self, handle):

c1 = self.get_connected(line.head)
c2 = self.get_connected(line.tail)
if c1 and c2:

if not line.subject:
assert isinstance(c1.subject, UML.ConnectableElement)
assert isinstance(c2.subject, UML.ConnectableElement)
relation = UML.model.create_connector(c1.subject, c2.subject)
line.subject = relation
if c1 and c2 and not line.subject:
assert isinstance(c1.subject, UML.ConnectableElement)
assert isinstance(c2.subject, UML.ConnectableElement)
relation = UML.model.create_connector(c1.subject, c2.subject)
line.subject = relation

0 comments on commit 5da7549

Please sign in to comment.