Skip to content

Commit

Permalink
fixed singleton-comparison pylint warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
firewave committed Jul 20, 2024
1 parent 43ef9c4 commit a59bb45
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions addons/cppcheckdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -978,22 +978,22 @@ def __repr__(self):
def isMatch(self, file, line, message, errorId):
# Line Suppression
if ((self.fileName is None or fnmatch(file, self.fileName))
and (self.suppressionType == None) # Verify use of default suppression type (None = unique)
and (self.lineNumber != None and int(line) == int(self.lineNumber))
and (self.suppressionType is None) # Verify use of default suppression type (None = unique)
and (self.lineNumber is not None and int(line) == int(self.lineNumber))
and (self.symbolName is None or fnmatch(message, '*'+self.symbolName+'*'))
and fnmatch(errorId, self.errorId)):
return True
# File Suppression
if ((self.fileName is None or fnmatch(file, self.fileName))
and (self.suppressionType != None and self.suppressionType == "file") # Verify use of file (global) suppression type
and (self.suppressionType is not None and self.suppressionType == "file") # Verify use of file (global) suppression type
and (self.symbolName is None or fnmatch(message, '*'+self.symbolName+'*'))
and fnmatch(errorId, self.errorId)):
return True
# Block Suppression Mode
if ((self.fileName is None or fnmatch(file, self.fileName))
and (self.suppressionType != None and self.suppressionType == "block") # Type for Block suppression
and (self.lineBegin != None and int(line) > int(self.lineBegin)) # Code Match is between the Block suppression
and (self.lineEnd != None and int(line) < int(self.lineEnd)) # Code Match is between the Block suppression
and (self.suppressionType is not None and self.suppressionType == "block") # Type for Block suppression
and (self.lineBegin is not None and int(line) > int(self.lineBegin)) # Code Match is between the Block suppression
and (self.lineEnd is not None and int(line) < int(self.lineEnd)) # Code Match is between the Block suppression
and (self.symbolName is None or fnmatch(message, '*'+self.symbolName+'*'))
and fnmatch(errorId, self.errorId)):
return True
Expand Down
2 changes: 1 addition & 1 deletion addons/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
VERIFY_ACTUAL = []

def reportError(token, severity, msg, id):
if id == 'debug' and DEBUG == False:
if id == 'debug' and not DEBUG:
return
if VERIFY:
VERIFY_ACTUAL.append(str(token.linenr) + ':' + id)
Expand Down
2 changes: 1 addition & 1 deletion addons/namingng.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ def report_pending_ifndef(directive,column):
phase = -1
continue
guard_name,guard_column = check_include_guard_name(conf,directive)
if guard_name == None:
if guard_name is None:
phase = -1
continue
pending_ifndef = directive
Expand Down

0 comments on commit a59bb45

Please sign in to comment.