From 3031da83abea91bb8b837b0b2db2912d2e767757 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 22 Jun 2026 18:43:13 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pre-commit/mirrors-clang-format: v18.1.8 → v22.1.5](https://github.com/pre-commit/mirrors-clang-format/compare/v18.1.8...v22.1.5) - [github.com/astral-sh/ruff-pre-commit: v0.5.1 → v0.15.18](https://github.com/astral-sh/ruff-pre-commit/compare/v0.5.1...v0.15.18) --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 From 064458982b5d4a44e10d661a3b00f8c06fc6e75a Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 22 Jun 2026 18:43:24 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- scripts/pefile.py | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) 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