@@ -731,8 +731,13 @@ class bytes(Sequence[int]):
731731 def translate (self , table : ReadableBuffer | None , / , delete : ReadableBuffer = b"" ) -> bytes : ...
732732 def upper (self ) -> bytes : ...
733733 def zfill (self , width : SupportsIndex , / ) -> bytes : ...
734- @classmethod
735- def fromhex (cls , string : str , / ) -> Self : ...
734+ if sys .version_info >= (3 , 14 ):
735+ @classmethod
736+ def fromhex (cls , string : str | ReadableBuffer , / ) -> Self : ...
737+ else :
738+ @classmethod
739+ def fromhex (cls , string : str , / ) -> Self : ...
740+
736741 @staticmethod
737742 def maketrans (frm : ReadableBuffer , to : ReadableBuffer , / ) -> bytes : ...
738743 def __len__ (self ) -> int : ...
@@ -836,8 +841,13 @@ class bytearray(MutableSequence[int]):
836841 def translate (self , table : ReadableBuffer | None , / , delete : bytes = b"" ) -> bytearray : ...
837842 def upper (self ) -> bytearray : ...
838843 def zfill (self , width : SupportsIndex , / ) -> bytearray : ...
839- @classmethod
840- def fromhex (cls , string : str , / ) -> Self : ...
844+ if sys .version_info >= (3 , 14 ):
845+ @classmethod
846+ def fromhex (cls , string : str | ReadableBuffer , / ) -> Self : ...
847+ else :
848+ @classmethod
849+ def fromhex (cls , string : str , / ) -> Self : ...
850+
841851 @staticmethod
842852 def maketrans (frm : ReadableBuffer , to : ReadableBuffer , / ) -> bytes : ...
843853 def __len__ (self ) -> int : ...
0 commit comments