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:
luz paz 2021-07-19 09:15:38 -04:00 committed by Seth Hillbrand
parent 8ce005026c
commit 8bacc9fccb
2 changed files with 2 additions and 2 deletions

View File

@ -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:

View File

@ -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):