]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.14] GH-129805: Clean up some changes from GH-129806 (GH-133540) (#138972)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 9 Oct 2025 11:12:25 +0000 (13:12 +0200)
committerGitHub <noreply@github.com>
Thu, 9 Oct 2025 11:12:25 +0000 (14:12 +0300)
Co-authored-by: Brandt Bucher <brandt@python.org>
Tools/jit/_stencils.py
Tools/jit/_targets.py

index 03b0ba647b0db774e0c7249e7b7c080ad9ebc99b..5977a7a30502baec8138444f03c4a54dbfeba608 100644 (file)
@@ -140,11 +140,7 @@ class Hole:
     def __post_init__(self) -> None:
         self.func = _PATCH_FUNCS[self.kind]
 
-    def fold(
-        self,
-        other: typing.Self,
-        body: bytes | bytearray,
-    ) -> typing.Self | None:
+    def fold(self, other: typing.Self, body: bytearray) -> typing.Self | None:
         """Combine two holes into a single hole, if possible."""
         instruction_a = int.from_bytes(
             body[self.offset : self.offset + 4], byteorder=sys.byteorder
index b383e39da194562c72c707cf777aa30d4e69f5df..ed63e388e433b9432bb69ba0545e189e57ae7011 100644 (file)
@@ -114,7 +114,7 @@ class _Target(typing.Generic[_S, _R]):
         raise NotImplementedError(type(self))
 
     def _handle_relocation(
-        self, base: int, relocation: _R, raw: bytes | bytearray
+        self, base: int, relocation: _R, raw: bytearray
     ) -> _stencils.Hole:
         raise NotImplementedError(type(self))
 
@@ -282,10 +282,7 @@ class _COFF(
         return _stencils.symbol_to_value(name)
 
     def _handle_relocation(
-        self,
-        base: int,
-        relocation: _schema.COFFRelocation,
-        raw: bytes | bytearray,
+        self, base: int, relocation: _schema.COFFRelocation, raw: bytearray
     ) -> _stencils.Hole:
         match relocation:
             case {
@@ -380,10 +377,7 @@ class _ELF(
             }, section_type
 
     def _handle_relocation(
-        self,
-        base: int,
-        relocation: _schema.ELFRelocation,
-        raw: bytes | bytearray,
+        self, base: int, relocation: _schema.ELFRelocation, raw: bytearray
     ) -> _stencils.Hole:
         symbol: str | None
         match relocation:
@@ -459,10 +453,7 @@ class _MachO(
             stencil.holes.append(hole)
 
     def _handle_relocation(
-        self,
-        base: int,
-        relocation: _schema.MachORelocation,
-        raw: bytes | bytearray,
+        self, base: int, relocation: _schema.MachORelocation, raw: bytearray
     ) -> _stencils.Hole:
         symbol: str | None
         match relocation: