]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
GH-129805: Clean up some changes from GH-129806 (GH-133540)
authorBrandt Bucher <brandt@python.org>
Tue, 16 Sep 2025 10:29:09 +0000 (11:29 +0100)
committerGitHub <noreply@github.com>
Tue, 16 Sep 2025 10:29:09 +0000 (11:29 +0100)
Tools/jit/_stencils.py
Tools/jit/_targets.py

index 1d82f5366f6ce0b0ef5acdf22db2e0b7dfdc19ef..14606b036db5197e38b52e9107558dde1f0f3cc0 100644 (file)
@@ -137,11 +137,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 c3ce24643fd4a687fbc150954adf0538ec4e0570..2185d8190a8935030685d1d3dd705ab23041f1e1 100644 (file)
@@ -119,7 +119,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))
 
@@ -297,10 +297,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 {
@@ -410,10 +407,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:
@@ -492,10 +486,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: