@@ -545,7 +545,7 @@ def Helper__InsertFileIntoIndex(
545545 assert fileKey != ""
546546 assert fileData .IsAlive ()
547547
548- if not ( fileKey in filesByStrKeyDictionary .keys () ):
548+ if fileKey not in filesByStrKeyDictionary .keys ():
549549 filesByStrKeyDictionary [fileKey ] = fileData
550550 else :
551551 indexItemData = filesByStrKeyDictionary [fileKey ]
@@ -574,7 +574,7 @@ def Helper__DeleteFileIntoIndex(
574574 assert fileKey != ""
575575 assert fileData .IsAlive ()
576576
577- if not ( fileKey in filesByStrKeyDictionary .keys () ):
577+ if fileKey not in filesByStrKeyDictionary .keys ():
578578 BugCheckError .FileIsNotFoundInIndex (fileKey , fileData .m_Path )
579579
580580 indexItemData = filesByStrKeyDictionary [fileKey ]
@@ -586,14 +586,14 @@ def Helper__DeleteFileIntoIndex(
586586 if typeOfIndexItemData == fileData :
587587 assert indexItemData is fileData
588588
589- if not ( indexItemData is fileData ) :
589+ if indexItemData is not fileData :
590590 BugCheckError .FileIsNotFoundInIndex (fileKey , fileData .m_Path )
591591
592592 filesByStrKeyDictionary .pop (fileKey )
593- assert not ( fileKey in filesByStrKeyDictionary .keys () )
593+ assert fileKey not in filesByStrKeyDictionary .keys ()
594594 return
595595
596- if typeOfIndexItemData == list :
596+ if typeOfIndexItemData is list :
597597 assert type (indexItemData ) is list
598598 assert len (indexItemData ) > 1
599599
@@ -635,7 +635,7 @@ def Helper__InsertOptionIntoIndex(
635635 assert type (optionsByNameDictionary ) is dict
636636 assert type (optionData ) is PgCfgModel__OptionData
637637
638- if not ( optionData .m_Name in optionsByNameDictionary .keys () ):
638+ if optionData .m_Name not in optionsByNameDictionary .keys ():
639639 optionsByNameDictionary [optionData .m_Name ] = optionData
640640 return
641641
@@ -666,7 +666,7 @@ def Helper__DeleteOptionFromIndex(
666666 assert type (optionsByNameDictionary ) is dict
667667 assert type (optionData ) is PgCfgModel__OptionData
668668
669- if not ( optionData .m_Name in optionsByNameDictionary .keys () ):
669+ if optionData .m_Name not in optionsByNameDictionary .keys ():
670670 BugCheckError .OptionIsNotFoundInIndex (optionData .m_Name )
671671
672672 data = optionsByNameDictionary [optionData .m_Name ]
@@ -675,17 +675,17 @@ def Helper__DeleteOptionFromIndex(
675675
676676 typeOfData = type (data )
677677
678- if typeOfData == PgCfgModel__OptionData :
678+ if typeOfData is PgCfgModel__OptionData :
679679 assert data is optionData
680680
681- if not ( data is optionData ) :
681+ if data is not optionData :
682682 BugCheckError .OptionIsNotFoundInIndex (optionData .m_Name )
683683
684684 optionsByNameDictionary .pop (optionData .m_Name )
685- assert not ( optionData .m_Name in optionsByNameDictionary .keys () )
685+ assert optionData .m_Name not in optionsByNameDictionary .keys ()
686686 return
687687
688- if typeOfData == list :
688+ if typeOfData is list :
689689 assert type (data ) is list
690690 assert len (data ) > 1
691691
0 commit comments