@@ -64,28 +64,28 @@ def noBorder(self):
6464 self .dd ._sendCommand (self .layer_id , "border" )
6565 def padding (self , left , top = None , right = None , bottom = None ):
6666 '''see border() for size unit'''
67- if top == None and right == None and bottom == None :
67+ if top is None and right is None and bottom is None :
6868 self .dd ._sendCommand (self .layer_id , "padding" , str (left ))
6969 else :
70- if top == None :
70+ if top is None :
7171 top = left
72- if right == None :
72+ if right is None :
7373 right = left
74- if bottom == None :
74+ if bottom is None :
7575 bottom = top
7676 self .dd ._sendCommand (self .layer_id , "padding" , str (left ), str (top ), str (right ), str (bottom ))
7777 def noPadding (self ):
7878 self .dd ._sendCommand (self .layer_id , "padding" )
7979 def margin (self , left , top = None , right = None , bottom = None ):
8080 '''see border() for size unit'''
81- if top == None and right == None and bottom == None :
81+ if top is None and right is None and bottom is None :
8282 self .dd ._sendCommand (self .layer_id , "margin" , str (left ))
8383 else :
84- if top == None :
84+ if top is None :
8585 top = left
86- if right == None :
86+ if right is None :
8787 right = left
88- if bottom == None :
88+ if bottom is None :
8989 bottom = top
9090 self .dd ._sendCommand (self .layer_id , "margin" , str (left ), str (top ), str (right ), str (bottom ))
9191 def noMargin (self ):
@@ -158,20 +158,11 @@ def reorderLayer(self, how: str):
158158
159159 def _handleFeedback (self , type , x , y ):
160160 #print("RAW FB: " + self.layer_id + '.' + type + ':' + str(x) + ',' + str(y))
161- if self ._feedback_handler != None :
161+ if self ._feedback_handler is not None :
162162 self ._feedback_handler (self , type , x , y )
163163 else :
164164 self ._feedbacks .append ((type , x , y ))
165165 # self._shipFeedbacks()
166- # def _shipFeedbacks(self):
167- # if self._feedback_handler != None:
168- # feedbacks = self._feedbacks.copy()
169- # self._feedbacks.clear()
170- # for (type, x, y) in feedbacks:
171- # self._feedback_handler.handleFeedback(type, x, y)
172- # # else:
173- # # for (type, x, y) in self.feedbacks:
174- # # print("unhandled FB: " + self.layer_id + '.' + type + ':' + str(x) + ',' + str(y))
175166
176167
177168
0 commit comments