@@ -978,22 +978,22 @@ def __repr__(self):
978
978
def isMatch (self , file , line , message , errorId ):
979
979
# Line Suppression
980
980
if ((self .fileName is None or fnmatch (file , self .fileName ))
981
- and (self .suppressionType == None ) # Verify use of default suppression type (None = unique)
982
- and (self .lineNumber != None and int (line ) == int (self .lineNumber ))
981
+ and (self .suppressionType is None ) # Verify use of default suppression type (None = unique)
982
+ and (self .lineNumber is not None and int (line ) == int (self .lineNumber ))
983
983
and (self .symbolName is None or fnmatch (message , '*' + self .symbolName + '*' ))
984
984
and fnmatch (errorId , self .errorId )):
985
985
return True
986
986
# File Suppression
987
987
if ((self .fileName is None or fnmatch (file , self .fileName ))
988
- and (self .suppressionType != None and self .suppressionType == "file" ) # Verify use of file (global) suppression type
988
+ and (self .suppressionType is not None and self .suppressionType == "file" ) # Verify use of file (global) suppression type
989
989
and (self .symbolName is None or fnmatch (message , '*' + self .symbolName + '*' ))
990
990
and fnmatch (errorId , self .errorId )):
991
991
return True
992
992
# Block Suppression Mode
993
993
if ((self .fileName is None or fnmatch (file , self .fileName ))
994
- and (self .suppressionType != None and self .suppressionType == "block" ) # Type for Block suppression
995
- and (self .lineBegin != None and int (line ) > int (self .lineBegin )) # Code Match is between the Block suppression
996
- and (self .lineEnd != None and int (line ) < int (self .lineEnd )) # Code Match is between the Block suppression
994
+ and (self .suppressionType is not None and self .suppressionType == "block" ) # Type for Block suppression
995
+ and (self .lineBegin is not None and int (line ) > int (self .lineBegin )) # Code Match is between the Block suppression
996
+ and (self .lineEnd is not None and int (line ) < int (self .lineEnd )) # Code Match is between the Block suppression
997
997
and (self .symbolName is None or fnmatch (message , '*' + self .symbolName + '*' ))
998
998
and fnmatch (errorId , self .errorId )):
999
999
return True
0 commit comments