diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1eac44c1..6acc078b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,11 +1,11 @@ repos: - repo: https://github.com/pre-commit/mirrors-clang-format - rev: 'v18.1.8' + rev: 'v22.1.5' hooks: - id: clang-format - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.5.1 + rev: v0.15.18 hooks: # Run the linter. - id: ruff diff --git a/scripts/pefile.py b/scripts/pefile.py index ef3e12a0..08434636 100644 --- a/scripts/pefile.py +++ b/scripts/pefile.py @@ -4036,7 +4036,7 @@ def parse_directory_tls(self, rva, size): ) except PEFormatError: self.__warnings.append( - "Invalid TLS information. Can't read " "data at RVA: 0x%x" % rva + "Invalid TLS information. Can't read data at RVA: 0x%x" % rva ) tls_struct = None @@ -4081,7 +4081,7 @@ def parse_directory_load_config(self, rva, size): ) except PEFormatError: self.__warnings.append( - "Invalid LOAD_CONFIG information. Can't read " "data at RVA: 0x%x" % rva + "Invalid LOAD_CONFIG information. Can't read data at RVA: 0x%x" % rva ) if not load_config_struct: @@ -4155,8 +4155,7 @@ def parse_dynamic_relocations( ) except PEFormatError: self.__warnings.append( - "Invalid relocation information. Can't read " - "data at RVA: 0x%x" % rva + "Invalid relocation information. Can't read data at RVA: 0x%x" % rva ) dynamic_rlc = None @@ -4213,8 +4212,7 @@ def parse_function_override_data(self, rva): ) if not func_header: self.__warnings.append( - "Invalid function override header. Can't read " - "data at RVA: 0x%x" % rva + "Invalid function override header. Can't read data at RVA: 0x%x" % rva ) return func_relocs, bdd_relocs rva += Structure(format).sizeof() @@ -4230,8 +4228,7 @@ def parse_function_override_data(self, rva): ) if not func_info: self.__warnings.append( - "Invalid function override info. Can't read " - "data at RVA: 0x%x" % rva + "Invalid function override info. Can't read data at RVA: 0x%x" % rva ) return func_relocs, bdd_relocs rva += Structure(format).sizeof() @@ -4263,7 +4260,7 @@ def parse_function_override_data(self, rva): ) if not bdd_info: self.__warnings.append( - "Invalid bdd info. Can't read " "data at RVA: 0x%x" % rva + "Invalid bdd info. Can't read data at RVA: 0x%x" % rva ) return func_relocs, bdd_relocs rva += Structure(format).sizeof() @@ -4277,8 +4274,7 @@ def parse_function_override_data(self, rva): ) if not bdd_reloc: self.__warnings.append( - "Invalid bdd dynamic relocation. Can't read " - "data at RVA: 0x%x" % rva + "Invalid bdd dynamic relocation. Can't read data at RVA: 0x%x" % rva ) return func_relocs, bdd_relocs rva += Structure(format).sizeof() @@ -4309,8 +4305,7 @@ def parse_image_base_relocation_list(self, rva, size, fmt=None): ) except PEFormatError: self.__warnings.append( - "Invalid relocation information. Can't read " - "data at RVA: 0x%x" % rva + "Invalid relocation information. Can't read data at RVA: 0x%x" % rva ) rlc = None @@ -4444,7 +4439,7 @@ def parse_debug_directory(self, rva, size): data = self.get_data(rva + dbg_size * idx, dbg_size) except PEFormatError: self.__warnings.append( - "Invalid debug information. Can't read " "data at RVA: 0x%x" % rva + "Invalid debug information. Can't read data at RVA: 0x%x" % rva ) return None @@ -6220,7 +6215,7 @@ def get_import_table(self, rva, max_length=None, contains_addresses=False): if failed or len(data) != expected_size: self.__warnings.append( - "Error parsing the import table. " "Invalid data at RVA: 0x%x" % rva + "Error parsing the import table. Invalid data at RVA: 0x%x" % rva ) return None