basedpyright 1.40.1 → 1.40.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/dist/pyright-langserver.js +1 -1
  2. package/dist/pyright.js +1 -1
  3. package/dist/typeshed-fallback/stdlib/_blake2.pyi +1 -1
  4. package/dist/typeshed-fallback/stdlib/_curses.pyi +81 -54
  5. package/dist/typeshed-fallback/stdlib/_curses_panel.pyi +8 -1
  6. package/dist/typeshed-fallback/stdlib/_decimal.pyi +9 -6
  7. package/dist/typeshed-fallback/stdlib/_interpqueues.pyi +24 -36
  8. package/dist/typeshed-fallback/stdlib/_interpreters.pyi +26 -71
  9. package/dist/typeshed-fallback/stdlib/_json.pyi +15 -11
  10. package/dist/typeshed-fallback/stdlib/_remote_debugging.pyi +355 -72
  11. package/dist/typeshed-fallback/stdlib/_socket.pyi +21 -21
  12. package/dist/typeshed-fallback/stdlib/_sqlite3.pyi +0 -15
  13. package/dist/typeshed-fallback/stdlib/_struct.pyi +39 -42
  14. package/dist/typeshed-fallback/stdlib/_thread.pyi +18 -14
  15. package/dist/typeshed-fallback/stdlib/array.pyi +8 -4
  16. package/dist/typeshed-fallback/stdlib/ast.pyi +9 -3
  17. package/dist/typeshed-fallback/stdlib/binascii.pyi +113 -10
  18. package/dist/typeshed-fallback/stdlib/builtins.pyi +260 -43
  19. package/dist/typeshed-fallback/stdlib/collections/__init__.pyi +12 -4
  20. package/dist/typeshed-fallback/stdlib/dataclasses.pyi +3 -1
  21. package/dist/typeshed-fallback/stdlib/datetime.pyi +93 -25
  22. package/dist/typeshed-fallback/stdlib/decimal.pyi +272 -208
  23. package/dist/typeshed-fallback/stdlib/faulthandler.pyi +29 -4
  24. package/dist/typeshed-fallback/stdlib/fcntl.pyi +6 -12
  25. package/dist/typeshed-fallback/stdlib/importlib/metadata/__init__.pyi +2 -0
  26. package/dist/typeshed-fallback/stdlib/json/encoder.pyi +2 -10
  27. package/dist/typeshed-fallback/stdlib/marshal.pyi +33 -2
  28. package/dist/typeshed-fallback/stdlib/math/__init__.pyi +15 -7
  29. package/dist/typeshed-fallback/stdlib/math/integer.pyi +43 -8
  30. package/dist/typeshed-fallback/stdlib/mmap.pyi +1 -1
  31. package/dist/typeshed-fallback/stdlib/os/__init__.pyi +60 -4
  32. package/dist/typeshed-fallback/stdlib/posixpath.pyi +14 -2
  33. package/dist/typeshed-fallback/stdlib/profiling/__init__.pyi +3 -3
  34. package/dist/typeshed-fallback/stdlib/profiling/sampling/__init__.pyi +17 -17
  35. package/dist/typeshed-fallback/stdlib/profiling/sampling/collector.pyi +25 -25
  36. package/dist/typeshed-fallback/stdlib/profiling/sampling/gecko_collector.pyi +111 -111
  37. package/dist/typeshed-fallback/stdlib/profiling/sampling/heatmap_collector.pyi +24 -24
  38. package/dist/typeshed-fallback/stdlib/profiling/sampling/jsonl_collector.pyi +15 -15
  39. package/dist/typeshed-fallback/stdlib/profiling/sampling/pstats_collector.pyi +17 -17
  40. package/dist/typeshed-fallback/stdlib/profiling/sampling/stack_collector.pyi +39 -39
  41. package/dist/typeshed-fallback/stdlib/profiling/sampling/string_table.pyi +5 -5
  42. package/dist/typeshed-fallback/stdlib/profiling/tracing.pyi +9 -9
  43. package/dist/typeshed-fallback/stdlib/pyexpat/__init__.pyi +24 -18
  44. package/dist/typeshed-fallback/stdlib/re.pyi +18 -3
  45. package/dist/typeshed-fallback/stdlib/select.pyi +2 -2
  46. package/dist/typeshed-fallback/stdlib/signal.pyi +1 -1
  47. package/dist/typeshed-fallback/stdlib/sqlite3/__init__.pyi +28 -5
  48. package/dist/typeshed-fallback/stdlib/sys/__init__.pyi +42 -4
  49. package/dist/typeshed-fallback/stdlib/types.pyi +44 -14
  50. package/dist/typeshed-fallback/stdlib/unicodedata.pyi +27 -9
  51. package/dist/typeshed-fallback/stdlib/urllib/parse.pyi +132 -6
  52. package/dist/typeshed-fallback/stdlib/winreg.pyi +5 -0
  53. package/dist/typeshed-fallback/stdlib/xml/utils.pyi +2 -2
  54. package/dist/typeshed-fallback/stdlib/zlib.pyi +34 -2
  55. package/package.json +1 -1
@@ -247,11 +247,6 @@ if sys.version_info >= (3, 12):
247
247
 
248
248
  You can use ":memory:" to open a database connection to a database that
249
249
  resides in RAM instead of on disk.
250
-
251
- Note: Passing more than 1 positional argument to _sqlite3.connect() is
252
- deprecated. Parameters 'timeout', 'detect_types', 'isolation_level',
253
- 'check_same_thread', 'factory', 'cached_statements' and 'uri' will
254
- become keyword-only parameters in Python 3.15.
255
250
  """
256
251
  ...
257
252
  @overload
@@ -272,11 +267,6 @@ if sys.version_info >= (3, 12):
272
267
 
273
268
  You can use ":memory:" to open a database connection to a database that
274
269
  resides in RAM instead of on disk.
275
-
276
- Note: Passing more than 1 positional argument to _sqlite3.connect() is
277
- deprecated. Parameters 'timeout', 'detect_types', 'isolation_level',
278
- 'check_same_thread', 'factory', 'cached_statements' and 'uri' will
279
- become keyword-only parameters in Python 3.15.
280
270
  """
281
271
  ...
282
272
  @overload
@@ -297,11 +287,6 @@ if sys.version_info >= (3, 12):
297
287
 
298
288
  You can use ":memory:" to open a database connection to a database that
299
289
  resides in RAM instead of on disk.
300
-
301
- Note: Passing more than 1 positional argument to _sqlite3.connect() is
302
- deprecated. Parameters 'timeout', 'detect_types', 'isolation_level',
303
- 'check_same_thread', 'factory', 'cached_statements' and 'uri' will
304
- become keyword-only parameters in Python 3.15.
305
290
  """
306
291
  ...
307
292
  else:
@@ -35,49 +35,46 @@ from typing_extensions import disjoint_base
35
35
 
36
36
  def pack(fmt: str | bytes, /, *v: Any) -> bytes:
37
37
  """
38
- pack(format, v1, v2, ...) -> bytes
38
+ Pack values and return the packed bytes.
39
39
 
40
- Return a bytes object containing the values v1, v2, ... packed according
40
+ Return a bytes object containing the provided values packed according
41
41
  to the format string. See help(struct) for more on format strings.
42
42
  """
43
43
  ...
44
44
  def pack_into(fmt: str | bytes, buffer: WriteableBuffer, offset: int, /, *v: Any) -> None:
45
45
  """
46
- pack_into(format, buffer, offset, v1, v2, ...)
46
+ Pack values and write the packed bytes into the buffer.
47
47
 
48
- Pack the values v1, v2, ... according to the format string and write
49
- the packed bytes into the writable buffer buf starting at offset. Note
50
- that the offset is a required argument. A negative offset counts from
51
- the end of the buffer. See help(struct) for more on format strings.
48
+ Pack the provided values according to the format string and write the
49
+ packed bytes into the writable buffer starting at offset. Note that the
50
+ offset is a required argument. A negative offset counts from the end of
51
+ the buffer. See help(struct) for more on format strings.
52
52
  """
53
53
  ...
54
54
  def unpack(format: str | bytes, buffer: ReadableBuffer, /) -> tuple[Any, ...]:
55
55
  """
56
56
  Return a tuple containing values unpacked according to the format string.
57
57
 
58
- The buffer's size in bytes must be calcsize(format).
59
-
60
- See help(struct) for more on format strings.
58
+ The buffer's size in bytes must be calcsize(format). See help(struct)
59
+ for more on format strings.
61
60
  """
62
61
  ...
63
62
  def unpack_from(format: str | bytes, /, buffer: ReadableBuffer, offset: int = 0) -> tuple[Any, ...]:
64
63
  """
65
64
  Return a tuple containing values unpacked according to the format string.
66
65
 
67
- The buffer's size, minus offset, must be at least calcsize(format).
68
- A negative offset counts from the end of the buffer.
69
-
70
- See help(struct) for more on format strings.
66
+ The buffer must contain at least calcsize(format) bytes starting at
67
+ offset. A negative offset counts from the end of the buffer. See
68
+ help(struct) for more on format strings.
71
69
  """
72
70
  ...
73
71
  def iter_unpack(format: str | bytes, buffer: ReadableBuffer, /) -> Iterator[tuple[Any, ...]]:
74
72
  """
75
73
  Return an iterator yielding tuples unpacked from the given bytes.
76
74
 
77
- The bytes are unpacked according to the format string, like
78
- a repeated invocation of unpack_from().
79
-
80
- Requires that the bytes length be a multiple of the format struct size.
75
+ The bytes are unpacked according to the format string, like a repeated
76
+ invocation of unpack_from(). Requires that the bytes length be
77
+ a multiple of calcsize(format).
81
78
  """
82
79
  ...
83
80
  def calcsize(format: str | bytes, /) -> int:
@@ -86,7 +83,12 @@ def calcsize(format: str | bytes, /) -> int:
86
83
 
87
84
  @disjoint_base
88
85
  class Struct:
89
- """Struct(fmt) --> compiled struct object"""
86
+ """
87
+ Create a compiled struct object.
88
+
89
+ Return a new Struct object which writes and reads binary data according
90
+ to the format string. See help(struct) for more on format strings.
91
+ """
90
92
  @property
91
93
  def format(self) -> str:
92
94
  """struct format string"""
@@ -98,45 +100,41 @@ class Struct:
98
100
  def __init__(self, format: str | bytes) -> None: ...
99
101
  def pack(self, *v: Any) -> bytes:
100
102
  """
101
- S.pack(v1, v2, ...) -> bytes
103
+ Pack values and return the packed bytes.
102
104
 
103
- Return a bytes object containing values v1, v2, ... packed according
104
- to the format string S.format. See help(struct) for more on format
105
- strings.
105
+ Return a bytes object containing the provided values packed
106
+ according to the struct format string. See help(struct) for more on
107
+ format strings.
106
108
  """
107
109
  ...
108
110
  def pack_into(self, buffer: WriteableBuffer, offset: int, *v: Any) -> None:
109
111
  """
110
- S.pack_into(buffer, offset, v1, v2, ...)
112
+ Pack values and write the packed bytes into the buffer.
111
113
 
112
- Pack the values v1, v2, ... according to the format string S.format
113
- and write the packed bytes into the writable buffer buf starting at
114
+ Pack the provided values according to the struct format string
115
+ and write the packed bytes into the writable buffer starting at
114
116
  offset. Note that the offset is a required argument. A negative
115
- offset counts from the end of the buffer. See help(struct) for more
116
- on format strings.
117
+ offset counts from the end of the buffer. See help(struct) for
118
+ more on format strings.
117
119
  """
118
120
  ...
119
121
  def unpack(self, buffer: ReadableBuffer, /) -> tuple[Any, ...]:
120
122
  """
121
123
  Return a tuple containing unpacked values.
122
124
 
123
- Unpack according to the format string Struct.format. The buffer's size
124
- in bytes must be Struct.size.
125
-
126
- See help(struct) for more on format strings.
125
+ Unpack according to the struct format string. The buffer's
126
+ size in bytes must be the struct size. See help(struct) for more on
127
+ format strings.
127
128
  """
128
129
  ...
129
130
  def unpack_from(self, buffer: ReadableBuffer, offset: int = 0) -> tuple[Any, ...]:
130
131
  """
131
132
  Return a tuple containing unpacked values.
132
133
 
133
- Values are unpacked according to the format string Struct.format.
134
-
135
- The buffer's size in bytes, starting at position offset, must be
136
- at least Struct.size. A negative offset counts from the end of the
137
- buffer.
138
-
139
- See help(struct) for more on format strings.
134
+ Values are unpacked according to the struct format string. The
135
+ buffer's size in bytes, starting at position offset, must be at
136
+ least the struct size. A negative offset counts from the end of
137
+ the buffer. See help(struct) for more on format strings.
140
138
  """
141
139
  ...
142
140
  def iter_unpack(self, buffer: ReadableBuffer, /) -> Iterator[tuple[Any, ...]]:
@@ -144,8 +142,7 @@ class Struct:
144
142
  Return an iterator yielding tuples.
145
143
 
146
144
  Tuples are unpacked from the given bytes source, like a repeated
147
- invocation of unpack_from().
148
-
149
- Requires that the bytes length be a multiple of the struct size.
145
+ invocation of unpack_from(). Requires that the bytes length be
146
+ a multiple of the struct size.
150
147
  """
151
148
  ...
@@ -32,7 +32,9 @@ def _count() -> int:
32
32
  class RLock:
33
33
  def acquire(self, blocking: bool = True, timeout: float = -1) -> bool:
34
34
  """
35
- Lock the lock. `blocking` indicates whether we should wait
35
+ Lock the lock.
36
+
37
+ `blocking` indicates whether we should wait
36
38
  for the lock to be available or not. If `blocking` is False
37
39
  and another thread holds the lock, the method will return False
38
40
  immediately. If `blocking` is True and another thread holds
@@ -48,14 +50,16 @@ class RLock:
48
50
  ...
49
51
  def release(self) -> None:
50
52
  """
51
- Release the lock, allowing another thread that is blocked waiting for
52
- the lock to acquire the lock. The lock must be in the locked state,
53
+ Release the lock.
54
+
55
+ Allows another thread that is blocked waiting for the lock
56
+ to acquire the lock. The lock must be in the locked state,
53
57
  and must be locked by the same thread that unlocks it; otherwise a
54
58
  `RuntimeError` is raised.
55
59
 
56
- Do note that if the lock was acquire()d several times in a row by the
57
- current thread, release() needs to be called as many times for the lock
58
- to be available for other threads.
60
+ Do note that if the lock was acquire()d several times in a row by
61
+ the current thread, release() needs to be called as many times for
62
+ the lock to be available for other threads.
59
63
  """
60
64
  ...
61
65
  __enter__ = acquire
@@ -64,11 +68,7 @@ class RLock:
64
68
  ...
65
69
  if sys.version_info >= (3, 14):
66
70
  def locked(self) -> bool:
67
- """
68
- locked()
69
-
70
- Return a boolean indicating whether this object is locked right now.
71
- """
71
+ """Return a boolean indicating whether this object is locked right now."""
72
72
  ...
73
73
 
74
74
  if sys.version_info >= (3, 13):
@@ -112,8 +112,10 @@ if sys.version_info >= (3, 13):
112
112
  """
113
113
  def acquire(self, blocking: bool = True, timeout: float = -1) -> bool:
114
114
  """
115
- Lock the lock. Without argument, this blocks if the lock is already
116
- locked (even by the same thread), waiting for another thread to release
115
+ Lock the lock.
116
+
117
+ Without argument, this blocks if the lock is already locked
118
+ (even by the same thread), waiting for another thread to release
117
119
  the lock, and return True once the lock is acquired.
118
120
  With an argument, this will only block if the argument is true,
119
121
  and the return value reflects whether the lock is acquired.
@@ -122,7 +124,9 @@ if sys.version_info >= (3, 13):
122
124
  ...
123
125
  def release(self) -> None:
124
126
  """
125
- Release the lock, allowing another thread that is blocked waiting for
127
+ Release the lock.
128
+
129
+ Allows another thread that is blocked waiting for
126
130
  the lock to acquire the lock. The lock must be in the locked state,
127
131
  but it needn't be locked by the same thread that unlocks it.
128
132
  """
@@ -1,7 +1,7 @@
1
1
  """
2
2
  This module defines an object type which can efficiently represent
3
3
  an array of basic values: characters, integers, floating-point
4
- numbers. Arrays are sequence types and behave very much like lists,
4
+ numbers, complex numbers. Arrays are sequence types and behave very much like lists,
5
5
  except that the type of objects stored in them is constrained.
6
6
  """
7
7
 
@@ -41,7 +41,7 @@ class array(MutableSequence[_T]):
41
41
 
42
42
  Arrays represent basic values and behave very much like lists, except
43
43
  the type of objects stored in them is constrained. The type is specified
44
- at object creation time by using a type code, which is a single character.
44
+ at object creation time by using a type code, which is a string.
45
45
  The following type codes are defined:
46
46
 
47
47
  Type code C Type Minimum size in bytes
@@ -56,8 +56,11 @@ class array(MutableSequence[_T]):
56
56
  'L' unsigned integer 4
57
57
  'q' signed integer 8 (see note)
58
58
  'Q' unsigned integer 8 (see note)
59
+ 'e' 16-bit IEEE floats 2
59
60
  'f' floating-point 4
60
61
  'd' floating-point 8
62
+ 'Zf' float complex 8
63
+ 'Zd' double complex 16
61
64
 
62
65
  NOTE: The 'u' typecode corresponds to Python's unicode character. On
63
66
  narrow builds this is 2-bytes on wide builds this is 4-bytes.
@@ -144,8 +147,9 @@ class array(MutableSequence[_T]):
144
147
  """
145
148
  Byteswap all items of the array.
146
149
 
147
- If the items in the array are not 1, 2, 4, or 8 bytes in size,
148
- RuntimeError is raised.
150
+ If the items in the array are not 1, 2, 4, 8 or 16 bytes in size,
151
+ RuntimeError is raised. Note, that for complex types the order of
152
+ components (the real part, followed by imaginary part) is preserved.
149
153
  """
150
154
  ...
151
155
  def count(self, v: _T, /) -> int:
@@ -777,7 +777,9 @@ class Import(stmt):
777
777
  def __init__(self, names: list[alias], **kwargs: Unpack[_Attributes]) -> None: ...
778
778
 
779
779
  if sys.version_info >= (3, 15):
780
- def __replace__(self, *, names: list[alias] = ..., is_lazy: bool | None = ..., **kwargs: Unpack[_Attributes]) -> Self: ...
780
+ def __replace__(self, *, names: list[alias] = ..., is_lazy: bool | None = ..., **kwargs: Unpack[_Attributes]) -> Self:
781
+ """Return a copy of the AST node with new values for the specified fields."""
782
+ ...
781
783
 
782
784
  elif sys.version_info >= (3, 14):
783
785
  def __replace__(self, *, names: list[alias] = ..., **kwargs: Unpack[_Attributes]) -> Self:
@@ -833,7 +835,9 @@ class ImportFrom(stmt):
833
835
  level: int = ...,
834
836
  is_lazy: bool | None = ...,
835
837
  **kwargs: Unpack[_Attributes],
836
- ) -> Self: ...
838
+ ) -> Self:
839
+ """Return a copy of the AST node with new values for the specified fields."""
840
+ ...
837
841
 
838
842
  elif sys.version_info >= (3, 14):
839
843
  def __replace__(
@@ -1057,7 +1061,9 @@ class DictComp(expr):
1057
1061
  value: expr | None = ...,
1058
1062
  generators: list[comprehension] = ...,
1059
1063
  **kwargs: Unpack[_Attributes],
1060
- ) -> Self: ...
1064
+ ) -> Self:
1065
+ """Return a copy of the AST node with new values for the specified fields."""
1066
+ ...
1061
1067
  elif sys.version_info >= (3, 14):
1062
1068
  def __replace__(
1063
1069
  self, *, key: expr = ..., value: expr = ..., generators: list[comprehension] = ..., **kwargs: Unpack[_Attributes]
@@ -36,13 +36,43 @@ if sys.version_info >= (3, 15):
36
36
  padded: bool = True,
37
37
  ignorechars: ReadableBuffer = ...,
38
38
  canonical: bool = False,
39
- ) -> bytes: ...
39
+ ) -> bytes:
40
+ """
41
+ Decode a line of base64 data.
42
+
43
+ strict_mode
44
+ When set to true, bytes that are not part of the base64 standard are
45
+ not allowed. The same applies to excess data after padding (= / ==).
46
+ Set to True by default if ignorechars is specified, False otherwise.
47
+ padded
48
+ When set to false, padding in input is not required.
49
+ ignorechars
50
+ A byte string containing characters to ignore from the input when
51
+ strict_mode is true.
52
+ canonical
53
+ When set to true, reject non-zero padding bits per RFC 4648 section 3.5.
54
+ """
55
+ ...
40
56
  def b2a_base64(
41
57
  data: ReadableBuffer, /, *, newline: bool = True, alphabet: ReadableBuffer = ..., padded: bool = True, wrapcol: int = 0
42
- ) -> bytes: ...
58
+ ) -> bytes:
59
+ """
60
+ Base64-code line of data.
61
+
62
+ padded
63
+ When set to false, omit padding in the output.
64
+ """
65
+ ...
43
66
  def b2a_base32(
44
67
  data: ReadableBuffer, /, *, alphabet: ReadableBuffer = ..., padded: bool = True, wrapcol: int = 0
45
- ) -> bytes: ...
68
+ ) -> bytes:
69
+ """
70
+ Base32-code line of data.
71
+
72
+ padded
73
+ When set to false, omit padding in the output.
74
+ """
75
+ ...
46
76
  def a2b_base32(
47
77
  data: _AsciiBuffer,
48
78
  /,
@@ -51,10 +81,34 @@ if sys.version_info >= (3, 15):
51
81
  padded: bool = True,
52
82
  ignorechars: ReadableBuffer = b"",
53
83
  canonical: bool = False,
54
- ) -> bytes: ...
84
+ ) -> bytes:
85
+ """
86
+ Decode a line of base32 data.
87
+
88
+ padded
89
+ When set to false, padding in input is not required.
90
+ ignorechars
91
+ A byte string containing characters to ignore from the input.
92
+ canonical
93
+ When set to true, reject non-zero padding bits per RFC 4648 section 3.5.
94
+ """
95
+ ...
55
96
  def b2a_ascii85(
56
97
  data: ReadableBuffer, /, *, foldspaces: bool = False, wrapcol: int = 0, pad: bool = False, adobe: bool = False
57
- ) -> bytes: ...
98
+ ) -> bytes:
99
+ """
100
+ Ascii85-encode data.
101
+
102
+ foldspaces
103
+ Emit 'y' as a short form encoding four spaces.
104
+ wrapcol
105
+ Split result into lines of provided width.
106
+ pad
107
+ Retain zero-padding bytes at end of output.
108
+ adobe
109
+ Wrap result in '<~' and '~>' as in Adobe Ascii85.
110
+ """
111
+ ...
58
112
  def a2b_ascii85(
59
113
  data: _AsciiBuffer,
60
114
  /,
@@ -63,11 +117,41 @@ if sys.version_info >= (3, 15):
63
117
  adobe: bool = False,
64
118
  ignorechars: ReadableBuffer = b"",
65
119
  canonical: bool = False,
66
- ) -> bytes: ...
67
- def b2a_base85(data: ReadableBuffer, /, *, alphabet: ReadableBuffer = ..., pad: bool = False, wrapcol: int = 0) -> bytes: ...
120
+ ) -> bytes:
121
+ """
122
+ Decode Ascii85 data.
123
+
124
+ foldspaces
125
+ Allow 'y' as a short form encoding four spaces.
126
+ adobe
127
+ Expect data to be terminated with '~>' as in Adobe Ascii85, and
128
+ optionally accept leading '<~'.
129
+ ignorechars
130
+ A byte string containing characters to ignore from the input.
131
+ canonical
132
+ When set to true, reject non-canonical encodings.
133
+ """
134
+ ...
135
+ def b2a_base85(data: ReadableBuffer, /, *, alphabet: ReadableBuffer = ..., pad: bool = False, wrapcol: int = 0) -> bytes:
136
+ """
137
+ Base85-code line of data.
138
+
139
+ pad
140
+ Retain zero-padding bytes at end of output.
141
+ """
142
+ ...
68
143
  def a2b_base85(
69
144
  data: _AsciiBuffer, /, *, alphabet: bytes = ..., ignorechars: ReadableBuffer = b"", canonical: bool = False
70
- ) -> bytes: ...
145
+ ) -> bytes:
146
+ """
147
+ Decode a line of Base85 data.
148
+
149
+ ignorechars
150
+ A byte string containing characters to ignore from the input.
151
+ canonical
152
+ When set to true, reject non-canonical encodings.
153
+ """
154
+ ...
71
155
 
72
156
  elif sys.version_info >= (3, 11):
73
157
  def a2b_base64(data: _AsciiBuffer, /, *, strict_mode: bool = False) -> bytes:
@@ -165,8 +249,27 @@ def hexlify(data: ReadableBuffer, sep: str | bytes = ..., bytes_per_sep: int = 1
165
249
  ...
166
250
 
167
251
  if sys.version_info >= (3, 15):
168
- def a2b_hex(hexstr: _AsciiBuffer, /, *, ignorechars: ReadableBuffer = b"") -> bytes: ...
169
- def unhexlify(hexstr: _AsciiBuffer, /, *, ignorechars: ReadableBuffer = b"") -> bytes: ...
252
+ def a2b_hex(hexstr: _AsciiBuffer, /, *, ignorechars: ReadableBuffer = b"") -> bytes:
253
+ """
254
+ Binary data of hexadecimal representation.
255
+
256
+ ignorechars
257
+ A byte string containing characters to ignore from the input.
258
+
259
+ hexstr must contain an even number of hex digits (upper or lower case).
260
+ This function is also available as "unhexlify()".
261
+ """
262
+ ...
263
+ def unhexlify(hexstr: _AsciiBuffer, /, *, ignorechars: ReadableBuffer = b"") -> bytes:
264
+ """
265
+ Binary data of hexadecimal representation.
266
+
267
+ ignorechars
268
+ A byte string containing characters to ignore from the input.
269
+
270
+ hexstr must contain an even number of hex digits (upper or lower case).
271
+ """
272
+ ...
170
273
 
171
274
  else:
172
275
  def a2b_hex(hexstr: _AsciiBuffer, /) -> bytes: