@@ -82,28 +82,28 @@ def set_endpoint1(self, endpoint: Endpoint):
8282 self .endpoint1 = endpoint
8383
8484 if self .numerical_endpoint_1 == 1 and self .numerical_endpoint_2 == 1 :
85- if endpoint is Endpoint .ARROW :
85+ if endpoint == Endpoint .ARROW :
8686 pass
8787 else :
88- if endpoint is Endpoint .TAIL :
88+ if endpoint == Endpoint .TAIL :
8989 self .numerical_endpoint_1 = - 1
9090 self .numerical_endpoint_2 = 1
9191 else :
92- if endpoint is Endpoint .CIRCLE :
92+ if endpoint == Endpoint .CIRCLE :
9393 self .numerical_endpoint_1 = 2
9494 self .numerical_endpoint_2 = 1
9595 else :
96- if endpoint is Endpoint .ARROW and self .numerical_endpoint_2 == 1 :
96+ if endpoint == Endpoint .ARROW and self .numerical_endpoint_2 == 1 :
9797 self .numerical_endpoint_1 = 1
9898 self .numerical_endpoint_2 = 1
9999 else :
100- if endpoint is Endpoint .ARROW :
100+ if endpoint == Endpoint .ARROW :
101101 self .numerical_endpoint_1 = 1
102102 else :
103- if endpoint is Endpoint .TAIL :
103+ if endpoint == Endpoint .TAIL :
104104 self .numerical_endpoint_1 = - 1
105105 else :
106- if endpoint is Endpoint .CIRCLE :
106+ if endpoint == Endpoint .CIRCLE :
107107 self .numerical_endpoint_1 = 2
108108
109109 if self .pointing_left (self .endpoint1 , self .endpoint2 ):
@@ -123,28 +123,28 @@ def set_endpoint2(self, endpoint: Endpoint):
123123 self .endpoint2 = endpoint
124124
125125 if self .numerical_endpoint_1 == 1 and self .numerical_endpoint_2 == 1 :
126- if endpoint is Endpoint .ARROW :
126+ if endpoint == Endpoint .ARROW :
127127 pass
128128 else :
129- if endpoint is Endpoint .TAIL :
129+ if endpoint == Endpoint .TAIL :
130130 self .numerical_endpoint_1 = 1
131131 self .numerical_endpoint_2 = - 1
132132 else :
133- if endpoint is Endpoint .CIRCLE :
133+ if endpoint == Endpoint .CIRCLE :
134134 self .numerical_endpoint_1 = 1
135135 self .numerical_endpoint_2 = 2
136136 else :
137- if endpoint is Endpoint .ARROW and self .numerical_endpoint_2 == 1 :
137+ if endpoint == Endpoint .ARROW and self .numerical_endpoint_2 == 1 :
138138 self .numerical_endpoint_1 = 1
139139 self .numerical_endpoint_2 = 1
140140 else :
141- if endpoint is Endpoint .ARROW :
141+ if endpoint == Endpoint .ARROW :
142142 self .numerical_endpoint_2 = 1
143143 else :
144- if endpoint is Endpoint .TAIL :
144+ if endpoint == Endpoint .TAIL :
145145 self .numerical_endpoint_2 = - 1
146146 else :
147- if endpoint is Endpoint .CIRCLE :
147+ if endpoint == Endpoint .CIRCLE :
148148 self .numerical_endpoint_2 = 2
149149
150150 if self .pointing_left (self .endpoint1 , self .endpoint2 ):
@@ -216,20 +216,20 @@ def __str__(self):
216216
217217 edge_string = node1 .get_name () + " "
218218
219- if endpoint1 is Endpoint .TAIL :
219+ if endpoint1 == Endpoint .TAIL :
220220 edge_string = edge_string + "-"
221221 else :
222- if endpoint1 is Endpoint .ARROW :
222+ if endpoint1 == Endpoint .ARROW :
223223 edge_string = edge_string + "<"
224224 else :
225225 edge_string = edge_string + "o"
226226
227227 edge_string = edge_string + "-"
228228
229- if endpoint2 is Endpoint .TAIL :
229+ if endpoint2 == Endpoint .TAIL :
230230 edge_string = edge_string + "-"
231231 else :
232- if endpoint2 is Endpoint .ARROW :
232+ if endpoint2 == Endpoint .ARROW :
233233 edge_string = edge_string + ">"
234234 else :
235235 edge_string = edge_string + "o"
0 commit comments