@@ -218,15 +218,29 @@ class int:
218
218
if sys .version_info >= (3 , 10 ):
219
219
def bit_count (self ) -> int : ...
220
220
221
- def to_bytes (self , length : SupportsIndex , byteorder : Literal ["little" , "big" ], * , signed : bool = ...) -> bytes : ...
222
- @classmethod
223
- def from_bytes (
224
- cls : type [Self ],
225
- bytes : Iterable [SupportsIndex ] | SupportsBytes | ReadableBuffer ,
226
- byteorder : Literal ["little" , "big" ],
227
- * ,
228
- signed : bool = ...,
229
- ) -> Self : ...
221
+ if sys .version_info >= (3 , 11 ):
222
+ def to_bytes (
223
+ self , length : SupportsIndex = ..., byteorder : Literal ["little" , "big" ] = ..., * , signed : bool = ...
224
+ ) -> bytes : ...
225
+ @classmethod
226
+ def from_bytes (
227
+ cls : type [Self ],
228
+ bytes : Iterable [SupportsIndex ] | SupportsBytes | ReadableBuffer ,
229
+ byteorder : Literal ["little" , "big" ] = ...,
230
+ * ,
231
+ signed : bool = ...,
232
+ ) -> Self : ...
233
+ else :
234
+ def to_bytes (self , length : SupportsIndex , byteorder : Literal ["little" , "big" ], * , signed : bool = ...) -> bytes : ...
235
+ @classmethod
236
+ def from_bytes (
237
+ cls : type [Self ],
238
+ bytes : Iterable [SupportsIndex ] | SupportsBytes | ReadableBuffer ,
239
+ byteorder : Literal ["little" , "big" ],
240
+ * ,
241
+ signed : bool = ...,
242
+ ) -> Self : ...
243
+
230
244
def __add__ (self , __x : int ) -> int : ...
231
245
def __sub__ (self , __x : int ) -> int : ...
232
246
def __mul__ (self , __x : int ) -> int : ...
0 commit comments