diff --git a/pefile.py b/pefile.py index 55ec1d9..2875b75 100644 --- a/pefile.py +++ b/pefile.py @@ -1375,7 +1375,7 @@ def get_bits_left(self): ac = Accumulator(old_fmt, comp_fields) for elm in format[1]: - if not ":" in elm: + if ":" not in elm: ac.wrap_up() old_fmt.append(elm) continue @@ -1400,7 +1400,7 @@ def get_bits_left(self): extended_keys = [] for idx, val in enumerate(keys): - if not idx in comp_fields: + if idx not in comp_fields: extended_keys.append(val) continue _, sbf = comp_fields[idx] @@ -3831,7 +3831,7 @@ def parse_exceptions_directory(self, rva, size): continue if not hasattr(rf.unwindinfo, "FunctionEntry"): continue - if not rf.unwindinfo.FunctionEntry in rva2rt: + if rf.unwindinfo.FunctionEntry not in rva2rt: self.__warnings.append( f"FunctionEntry of UNWIND_INFO at {rf.struct.get_file_offset():x}" " points to an entry that does not exist" @@ -5539,7 +5539,7 @@ def length_until_eof(rva): symbol_counts = collections.defaultdict(int) export_parsing_loop_completed_normally = True for idx in range(min(export_dir.NumberOfFunctions, int(safety_boundary / 4))): - if not idx + export_dir.Base in ordinals: + if idx + export_dir.Base not in ordinals: try: symbol_address = self.get_dword_from_data(address_of_functions, idx) except PEFormatError: