Fix python 'testing for equality' syntax
'Testing whether an object is 'None' using the == operator is inefficient and potentially incorrect.' Per https://lgtm.com/projects/g/KiCad/kicad-source-mirror/?mode=tree&ruleFocus=7900090
This commit is contained in:
parent
8ce005026c
commit
8bacc9fccb
|
@ -459,7 +459,7 @@ class netlist():
|
|||
|
||||
def addElement(self, name):
|
||||
"""Add a new kicad generic element to the list"""
|
||||
if self._curr_element == None:
|
||||
if self._curr_element is None:
|
||||
self.tree = xmlElement(name)
|
||||
self._curr_element = self.tree
|
||||
else:
|
||||
|
|
|
@ -131,7 +131,7 @@ class QRCode:
|
|||
rows.reverse()
|
||||
for row in rows:
|
||||
for c in range(2):
|
||||
if self.modules[row][col - c] == None:
|
||||
if self.modules[row][col - c] is None:
|
||||
|
||||
dark = False
|
||||
if byteIndex < len(data):
|
||||
|
|
Loading…
Reference in New Issue