assertpy 2.35.0__py3-none-any.whl

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 (63) hide show
  1. assertpy/__init__.py +87 -0
  2. assertpy/_clustering.py +511 -0
  3. assertpy/_dangling.py +505 -0
  4. assertpy/_engine/__init__.py +1 -0
  5. assertpy/_engine/_builder_check_typing.py +1365 -0
  6. assertpy/_engine/_capable_typing.py +772 -0
  7. assertpy/_engine/_check_typing.py +753 -0
  8. assertpy/_engine/_compare.py +983 -0
  9. assertpy/_engine/_compat.py +38 -0
  10. assertpy/_engine/_contract.py +1926 -0
  11. assertpy/_engine/_diff.py +1058 -0
  12. assertpy/_engine/_equality.py +843 -0
  13. assertpy/_engine/_introspection.py +729 -0
  14. assertpy/_engine/_membership.py +522 -0
  15. assertpy/_engine/_mixin_base.py +258 -0
  16. assertpy/_engine/_negated_typing.py +2176 -0
  17. assertpy/_engine/_operations.py +75 -0
  18. assertpy/_engine/_ordering.py +884 -0
  19. assertpy/_engine/_pairing.py +70 -0
  20. assertpy/_engine/_path.py +158 -0
  21. assertpy/_engine/_poll_typing.py +6039 -0
  22. assertpy/_engine/_require.py +312 -0
  23. assertpy/_engine/_size.py +31 -0
  24. assertpy/_engine/_text.py +39 -0
  25. assertpy/_engine/_typing.py +1226 -0
  26. assertpy/_hints.py +1213 -0
  27. assertpy/_inline.py +484 -0
  28. assertpy/_matcher_impls.py +1876 -0
  29. assertpy/_passes.py +249 -0
  30. assertpy/_renamed.py +64 -0
  31. assertpy/_satisfies.py +835 -0
  32. assertpy/_snapshot_codec.py +290 -0
  33. assertpy/assertpy.py +2640 -0
  34. assertpy/async_assertions.py +864 -0
  35. assertpy/base.py +862 -0
  36. assertpy/behave_matchers.py +96 -0
  37. assertpy/bytes_mixin.py +158 -0
  38. assertpy/collection.py +528 -0
  39. assertpy/contains.py +1068 -0
  40. assertpy/dataframe.py +200 -0
  41. assertpy/date.py +327 -0
  42. assertpy/dict.py +249 -0
  43. assertpy/dynamic.py +222 -0
  44. assertpy/errors.py +782 -0
  45. assertpy/exception.py +838 -0
  46. assertpy/extracting.py +266 -0
  47. assertpy/file.py +324 -0
  48. assertpy/helpers.py +747 -0
  49. assertpy/http_mixin.py +218 -0
  50. assertpy/json_mixin.py +1265 -0
  51. assertpy/matchers.py +639 -0
  52. assertpy/numeric.py +696 -0
  53. assertpy/outcome.py +163 -0
  54. assertpy/py.typed +0 -0
  55. assertpy/pytest_plugin.py +1650 -0
  56. assertpy/snapshot.py +1031 -0
  57. assertpy/string.py +803 -0
  58. assertpy/warning.py +137 -0
  59. assertpy-2.35.0.dist-info/METADATA +324 -0
  60. assertpy-2.35.0.dist-info/RECORD +63 -0
  61. assertpy-2.35.0.dist-info/WHEEL +4 -0
  62. assertpy-2.35.0.dist-info/entry_points.txt +2 -0
  63. assertpy-2.35.0.dist-info/licenses/LICENSE +28 -0
@@ -0,0 +1,1365 @@
1
+ """The verdict twin of a value the builder holds.
2
+
3
+ Generated by `scripts/generate_poll_protocols.py`; do not edit. `check()` on a typed view hands back
4
+ that view's own twin. This is the one a value reaches through the builder, which is where an element
5
+ pivot and the capability umbrella both land.
6
+
7
+ Flat and self-dispatched for the same measured reason the polling twins are: overloading `check()` on
8
+ the builder's own type variable put an `AssertionBuilder[Any]` on the first rung, and every chain built
9
+ from a payload typed `dict[str, Any]` then read as a string. A rung per assertion inverts that.
10
+
11
+ A name nobody declares stays open, because `__getattr__` answers it: a dynamic assertion is resolved
12
+ from the value's own attributes and reaches this proxy too.
13
+
14
+ `val` and `value` are declared, and not only because the proxy hands the value back under them. They
15
+ hand the protocol's parameter out directly, where `not_` names it only through the protocol itself.
16
+ Measured on a protocol of two members: with `not_` alone ty takes the twin over a number for the twin
17
+ over a text, so no restriction on ``self`` was read and a text verdict asked of a number was taken.
18
+ """
19
+
20
+ from __future__ import annotations
21
+
22
+ from typing import TYPE_CHECKING
23
+
24
+ if TYPE_CHECKING:
25
+ import datetime
26
+ import pathlib
27
+ import re
28
+ from collections.abc import Callable, Hashable, Iterable, Mapping, Sized
29
+ from pathlib import Path
30
+ from typing import Any, Protocol, SupportsFloat, SupportsIndex, TypeVar, overload
31
+
32
+ from .._matcher_impls import ClassInfo
33
+ from ..matchers import Matcher
34
+ from ..outcome import AssertionOutcome
35
+ from ._capable_typing import (
36
+ _Indexed,
37
+ _Keyed,
38
+ _KeyedWithItems,
39
+ _KeyedWithValues,
40
+ _Orderable,
41
+ _PathLike,
42
+ )
43
+ from ._introspection import MappingLike
44
+ from ._typing import (
45
+ _U,
46
+ _ArrayT_co,
47
+ _Capable,
48
+ _FrameT_co,
49
+ _Other,
50
+ _P_co,
51
+ )
52
+
53
+ _KeySpecs = Hashable | list[Hashable] | set[Hashable] | frozenset[Hashable]
54
+
55
+ _E = TypeVar("_E")
56
+ _N = TypeVar("_N", int, float)
57
+ _K = TypeVar("_K")
58
+ _V = TypeVar("_V")
59
+ _R = TypeVar("_R")
60
+ _B_co = TypeVar("_B_co", bytes, bytearray, covariant=True)
61
+ _U2 = TypeVar("_U2")
62
+ _U3 = TypeVar("_U3")
63
+ _Number = SupportsFloat
64
+
65
+ # the rungs below restrict `self` with the annotations `assert_that()` overloads are written with
66
+ _T = TypeVar("_T")
67
+ _P = TypeVar("_P")
68
+
69
+ class _CheckAnyValue(Protocol[_P_co]):
70
+ """The verdict surface of a value reached through the builder rather than through a view."""
71
+
72
+ @property
73
+ def not_(self) -> _CheckAnyValue[_P_co]: ...
74
+ @property
75
+ def val(self) -> _P_co: ...
76
+ @property
77
+ def value(self) -> _P_co: ...
78
+ def __getattr__(self, name: str) -> Callable[..., AssertionOutcome]: ...
79
+
80
+ @overload
81
+ def satisfies(
82
+ self: _CheckAnyValue[str], matcher: Matcher[str] | Callable[[str], object]
83
+ ) -> AssertionOutcome: ...
84
+ @overload
85
+ def satisfies(
86
+ self: _CheckAnyValue[int] | _CheckAnyValue[float], matcher: Matcher[_N] | Callable[[_N], object]
87
+ ) -> AssertionOutcome: ...
88
+ @overload
89
+ def satisfies(self, matcher: Matcher[Any] | Callable[[Any], object]) -> AssertionOutcome: ...
90
+
91
+ @overload
92
+ def contains(self: _CheckAnyValue[str], *items: str | Matcher[str]) -> AssertionOutcome: ...
93
+ @overload
94
+ def contains(self: _CheckAnyValue[dict[_K, _V]], *items: object) -> AssertionOutcome: ...
95
+ @overload
96
+ def contains(
97
+ self: _CheckAnyValue[list[_E]]
98
+ | _CheckAnyValue[tuple[_E, ...]]
99
+ | _CheckAnyValue[set[_E]]
100
+ | _CheckAnyValue[frozenset[_E]],
101
+ *items: _E | Matcher[_E],
102
+ ) -> AssertionOutcome: ...
103
+ @overload
104
+ def contains(self: _CheckAnyValue[bytes] | _CheckAnyValue[bytearray], *items: object) -> AssertionOutcome: ...
105
+ @overload
106
+ def contains(
107
+ self: _CheckAnyValue[_FrameT_co] | _CheckAnyValue[_ArrayT_co], *items: object
108
+ ) -> AssertionOutcome: ...
109
+ @overload
110
+ def contains(self: _CheckAnyValue[_Capable], *items: object) -> AssertionOutcome: ...
111
+
112
+ def is_equal_to_ignoring_case(self: _CheckAnyValue[str], other: str) -> AssertionOutcome: ...
113
+
114
+ def is_equal_to_ignoring_whitespace(self: _CheckAnyValue[str], other: str) -> AssertionOutcome: ...
115
+
116
+ @overload
117
+ def contains_ignoring_case(self: _CheckAnyValue[str], *items: str) -> AssertionOutcome: ...
118
+ @overload
119
+ def contains_ignoring_case(self: _CheckAnyValue[_Capable], *items: str) -> AssertionOutcome: ...
120
+
121
+ @overload
122
+ def starts_with(self: _CheckAnyValue[str], prefix: str) -> AssertionOutcome: ...
123
+ @overload
124
+ def starts_with(
125
+ self: _CheckAnyValue[list[_E]]
126
+ | _CheckAnyValue[tuple[_E, ...]]
127
+ | _CheckAnyValue[set[_E]]
128
+ | _CheckAnyValue[frozenset[_E]],
129
+ prefix: _E,
130
+ ) -> AssertionOutcome: ...
131
+ @overload
132
+ def starts_with(
133
+ self: _CheckAnyValue[bytes] | _CheckAnyValue[bytearray], prefix: bytes | bytearray
134
+ ) -> AssertionOutcome: ...
135
+ @overload
136
+ def starts_with(self: _CheckAnyValue[_Capable], prefix: str) -> AssertionOutcome: ...
137
+
138
+ def starts_with_ignoring_case(self: _CheckAnyValue[str], prefix: str) -> AssertionOutcome: ...
139
+
140
+ @overload
141
+ def ends_with(self: _CheckAnyValue[str], suffix: str) -> AssertionOutcome: ...
142
+ @overload
143
+ def ends_with(
144
+ self: _CheckAnyValue[list[_E]]
145
+ | _CheckAnyValue[tuple[_E, ...]]
146
+ | _CheckAnyValue[set[_E]]
147
+ | _CheckAnyValue[frozenset[_E]],
148
+ suffix: _E,
149
+ ) -> AssertionOutcome: ...
150
+ @overload
151
+ def ends_with(
152
+ self: _CheckAnyValue[bytes] | _CheckAnyValue[bytearray], suffix: bytes | bytearray
153
+ ) -> AssertionOutcome: ...
154
+ @overload
155
+ def ends_with(self: _CheckAnyValue[_Capable], suffix: str) -> AssertionOutcome: ...
156
+
157
+ def ends_with_ignoring_case(self: _CheckAnyValue[str], suffix: str) -> AssertionOutcome: ...
158
+
159
+ def matches(self: _CheckAnyValue[str], pattern: str | re.Pattern[str]) -> AssertionOutcome: ...
160
+
161
+ def does_not_match(self: _CheckAnyValue[str], pattern: str | re.Pattern[str]) -> AssertionOutcome: ...
162
+
163
+ def is_alpha(self: _CheckAnyValue[str]) -> AssertionOutcome: ...
164
+
165
+ def is_digit(self: _CheckAnyValue[str]) -> AssertionOutcome: ...
166
+
167
+ def is_lower(self: _CheckAnyValue[str]) -> AssertionOutcome: ...
168
+
169
+ def is_upper(self: _CheckAnyValue[str]) -> AssertionOutcome: ...
170
+
171
+ def is_alphanumeric(self: _CheckAnyValue[str]) -> AssertionOutcome: ...
172
+
173
+ def is_whitespace(self: _CheckAnyValue[str]) -> AssertionOutcome: ...
174
+
175
+ @overload
176
+ def contains_any_of(self: _CheckAnyValue[str], *items: str) -> AssertionOutcome: ...
177
+ @overload
178
+ def contains_any_of(self: _CheckAnyValue[_Capable], *items: str) -> AssertionOutcome: ...
179
+
180
+ @overload
181
+ def contains_none_of(self: _CheckAnyValue[str], *items: str) -> AssertionOutcome: ...
182
+ @overload
183
+ def contains_none_of(self: _CheckAnyValue[_Capable], *items: str) -> AssertionOutcome: ...
184
+
185
+ @overload
186
+ def is_unicode(self: _CheckAnyValue[str]) -> AssertionOutcome: ...
187
+ @overload
188
+ def is_unicode(self: _CheckAnyValue[_Capable]) -> AssertionOutcome: ...
189
+
190
+ @overload
191
+ def is_greater_than(self: _CheckAnyValue[str], other: str) -> AssertionOutcome: ...
192
+ @overload
193
+ def is_greater_than(
194
+ self: _CheckAnyValue[bool] | _CheckAnyValue[int] | _CheckAnyValue[float], other: _Number
195
+ ) -> AssertionOutcome: ...
196
+ @overload
197
+ def is_greater_than(self: _CheckAnyValue[datetime.datetime], other: datetime.datetime) -> AssertionOutcome: ...
198
+ @overload
199
+ def is_greater_than(self: _CheckAnyValue[datetime.date], other: datetime.date) -> AssertionOutcome: ...
200
+ @overload
201
+ def is_greater_than(
202
+ self: _CheckAnyValue[bytes] | _CheckAnyValue[bytearray], other: bytes | bytearray
203
+ ) -> AssertionOutcome: ...
204
+ @overload
205
+ def is_greater_than(self: _CheckAnyValue[_T], other: Any) -> AssertionOutcome: ...
206
+ @overload
207
+ def is_greater_than(self: _CheckAnyValue[_Orderable], other: _Number) -> AssertionOutcome: ...
208
+
209
+ @overload
210
+ def is_greater_than_or_equal_to(self: _CheckAnyValue[str], other: str) -> AssertionOutcome: ...
211
+ @overload
212
+ def is_greater_than_or_equal_to(
213
+ self: _CheckAnyValue[bool] | _CheckAnyValue[int] | _CheckAnyValue[float], other: _Number
214
+ ) -> AssertionOutcome: ...
215
+ @overload
216
+ def is_greater_than_or_equal_to(
217
+ self: _CheckAnyValue[datetime.datetime], other: datetime.datetime
218
+ ) -> AssertionOutcome: ...
219
+ @overload
220
+ def is_greater_than_or_equal_to(
221
+ self: _CheckAnyValue[datetime.date], other: datetime.date
222
+ ) -> AssertionOutcome: ...
223
+ @overload
224
+ def is_greater_than_or_equal_to(
225
+ self: _CheckAnyValue[bytes] | _CheckAnyValue[bytearray], other: bytes | bytearray
226
+ ) -> AssertionOutcome: ...
227
+ @overload
228
+ def is_greater_than_or_equal_to(self: _CheckAnyValue[_T], other: Any) -> AssertionOutcome: ...
229
+ @overload
230
+ def is_greater_than_or_equal_to(self: _CheckAnyValue[_Orderable], other: _Number) -> AssertionOutcome: ...
231
+
232
+ @overload
233
+ def is_less_than(self: _CheckAnyValue[str], other: str) -> AssertionOutcome: ...
234
+ @overload
235
+ def is_less_than(
236
+ self: _CheckAnyValue[bool] | _CheckAnyValue[int] | _CheckAnyValue[float], other: _Number
237
+ ) -> AssertionOutcome: ...
238
+ @overload
239
+ def is_less_than(self: _CheckAnyValue[datetime.datetime], other: datetime.datetime) -> AssertionOutcome: ...
240
+ @overload
241
+ def is_less_than(self: _CheckAnyValue[datetime.date], other: datetime.date) -> AssertionOutcome: ...
242
+ @overload
243
+ def is_less_than(
244
+ self: _CheckAnyValue[bytes] | _CheckAnyValue[bytearray], other: bytes | bytearray
245
+ ) -> AssertionOutcome: ...
246
+ @overload
247
+ def is_less_than(self: _CheckAnyValue[_T], other: Any) -> AssertionOutcome: ...
248
+ @overload
249
+ def is_less_than(self: _CheckAnyValue[_Orderable], other: _Number) -> AssertionOutcome: ...
250
+
251
+ @overload
252
+ def is_less_than_or_equal_to(self: _CheckAnyValue[str], other: str) -> AssertionOutcome: ...
253
+ @overload
254
+ def is_less_than_or_equal_to(
255
+ self: _CheckAnyValue[bool] | _CheckAnyValue[int] | _CheckAnyValue[float], other: _Number
256
+ ) -> AssertionOutcome: ...
257
+ @overload
258
+ def is_less_than_or_equal_to(
259
+ self: _CheckAnyValue[datetime.datetime], other: datetime.datetime
260
+ ) -> AssertionOutcome: ...
261
+ @overload
262
+ def is_less_than_or_equal_to(self: _CheckAnyValue[datetime.date], other: datetime.date) -> AssertionOutcome: ...
263
+ @overload
264
+ def is_less_than_or_equal_to(
265
+ self: _CheckAnyValue[bytes] | _CheckAnyValue[bytearray], other: bytes | bytearray
266
+ ) -> AssertionOutcome: ...
267
+ @overload
268
+ def is_less_than_or_equal_to(self: _CheckAnyValue[_T], other: Any) -> AssertionOutcome: ...
269
+ @overload
270
+ def is_less_than_or_equal_to(self: _CheckAnyValue[_Orderable], other: _Number) -> AssertionOutcome: ...
271
+
272
+ @overload
273
+ def does_not_contain(self: _CheckAnyValue[str], *items: str | Matcher[str]) -> AssertionOutcome: ...
274
+ @overload
275
+ def does_not_contain(self: _CheckAnyValue[dict[_K, _V]], *items: object) -> AssertionOutcome: ...
276
+ @overload
277
+ def does_not_contain(
278
+ self: _CheckAnyValue[list[_E]]
279
+ | _CheckAnyValue[tuple[_E, ...]]
280
+ | _CheckAnyValue[set[_E]]
281
+ | _CheckAnyValue[frozenset[_E]],
282
+ *items: _E | Matcher[_E],
283
+ ) -> AssertionOutcome: ...
284
+ @overload
285
+ def does_not_contain(
286
+ self: _CheckAnyValue[bytes] | _CheckAnyValue[bytearray], *items: object
287
+ ) -> AssertionOutcome: ...
288
+ @overload
289
+ def does_not_contain(
290
+ self: _CheckAnyValue[_FrameT_co] | _CheckAnyValue[_ArrayT_co], *items: object
291
+ ) -> AssertionOutcome: ...
292
+ @overload
293
+ def does_not_contain(self: _CheckAnyValue[_Capable], *items: object) -> AssertionOutcome: ...
294
+
295
+ @overload
296
+ def contains_only(self: _CheckAnyValue[str], *items: str | Matcher[str]) -> AssertionOutcome: ...
297
+ @overload
298
+ def contains_only(self: _CheckAnyValue[dict[_K, _V]], *keys: object) -> AssertionOutcome: ...
299
+ @overload
300
+ def contains_only(
301
+ self: _CheckAnyValue[list[_E]]
302
+ | _CheckAnyValue[tuple[_E, ...]]
303
+ | _CheckAnyValue[set[_E]]
304
+ | _CheckAnyValue[frozenset[_E]],
305
+ *items: _E | Matcher[_E],
306
+ ) -> AssertionOutcome: ...
307
+ @overload
308
+ def contains_only(
309
+ self: _CheckAnyValue[_FrameT_co] | _CheckAnyValue[_ArrayT_co], *items: object
310
+ ) -> AssertionOutcome: ...
311
+ @overload
312
+ def contains_only(self: _CheckAnyValue[_Capable], *items: object) -> AssertionOutcome: ...
313
+
314
+ @overload
315
+ def contains_sequence(self: _CheckAnyValue[str], *items: str | Matcher[str]) -> AssertionOutcome: ...
316
+ @overload
317
+ def contains_sequence(
318
+ self: _CheckAnyValue[list[_E]]
319
+ | _CheckAnyValue[tuple[_E, ...]]
320
+ | _CheckAnyValue[set[_E]]
321
+ | _CheckAnyValue[frozenset[_E]],
322
+ *items: _E | Matcher[_E],
323
+ ) -> AssertionOutcome: ...
324
+ @overload
325
+ def contains_sequence(self: _CheckAnyValue[_Capable], *items: str | Matcher[str]) -> AssertionOutcome: ...
326
+
327
+ @overload
328
+ def contains_exactly(self: _CheckAnyValue[str], *items: str | Matcher[str]) -> AssertionOutcome: ...
329
+ @overload
330
+ def contains_exactly(
331
+ self: _CheckAnyValue[list[_E]]
332
+ | _CheckAnyValue[tuple[_E, ...]]
333
+ | _CheckAnyValue[set[_E]]
334
+ | _CheckAnyValue[frozenset[_E]],
335
+ *items: _E | Matcher[_E],
336
+ ) -> AssertionOutcome: ...
337
+ @overload
338
+ def contains_exactly(self: _CheckAnyValue[_Capable], *items: str | Matcher[str]) -> AssertionOutcome: ...
339
+
340
+ @overload
341
+ def contains_exactly_in_any_order(
342
+ self: _CheckAnyValue[str], *items: str | Matcher[str]
343
+ ) -> AssertionOutcome: ...
344
+ @overload
345
+ def contains_exactly_in_any_order(
346
+ self: _CheckAnyValue[list[_E]]
347
+ | _CheckAnyValue[tuple[_E, ...]]
348
+ | _CheckAnyValue[set[_E]]
349
+ | _CheckAnyValue[frozenset[_E]],
350
+ *items: _E | Matcher[_E],
351
+ ) -> AssertionOutcome: ...
352
+ @overload
353
+ def contains_exactly_in_any_order(
354
+ self: _CheckAnyValue[_Capable], *items: str | Matcher[str]
355
+ ) -> AssertionOutcome: ...
356
+
357
+ @overload
358
+ def is_sorted(
359
+ self: _CheckAnyValue[str],
360
+ key: Callable[[str], object] = ...,
361
+ reverse: bool = ...,
362
+ *,
363
+ allow_empty: bool = ...,
364
+ ) -> AssertionOutcome: ...
365
+ @overload
366
+ def is_sorted(
367
+ self: _CheckAnyValue[dict[_K, _V]],
368
+ key: Callable[[_K], object] = ...,
369
+ reverse: bool = ...,
370
+ *,
371
+ allow_empty: bool = ...,
372
+ ) -> AssertionOutcome: ...
373
+ @overload
374
+ def is_sorted(
375
+ self: _CheckAnyValue[list[_E]]
376
+ | _CheckAnyValue[tuple[_E, ...]]
377
+ | _CheckAnyValue[set[_E]]
378
+ | _CheckAnyValue[frozenset[_E]],
379
+ key: Callable[[_E], object] = ...,
380
+ reverse: bool = ...,
381
+ *,
382
+ allow_empty: bool = ...,
383
+ ) -> AssertionOutcome: ...
384
+ @overload
385
+ def is_sorted(
386
+ self: _CheckAnyValue[bytes] | _CheckAnyValue[bytearray],
387
+ key: Callable[[int], object] = ...,
388
+ reverse: bool = ...,
389
+ *,
390
+ allow_empty: bool = ...,
391
+ ) -> AssertionOutcome: ...
392
+ @overload
393
+ def is_sorted(
394
+ self: _CheckAnyValue[_Capable],
395
+ key: Callable[[str], object] = ...,
396
+ reverse: bool = ...,
397
+ *,
398
+ allow_empty: bool = ...,
399
+ ) -> AssertionOutcome: ...
400
+
401
+ @overload
402
+ def each(
403
+ self: _CheckAnyValue[str], matcher: Matcher[str] | Callable[[str], object], *, allow_empty: bool = ...
404
+ ) -> AssertionOutcome: ...
405
+ @overload
406
+ def each(
407
+ self: _CheckAnyValue[dict[_K, _V]],
408
+ matcher: Matcher[_K] | Callable[[_K], object],
409
+ *,
410
+ allow_empty: bool = ...,
411
+ ) -> AssertionOutcome: ...
412
+ @overload
413
+ def each(
414
+ self: _CheckAnyValue[dict[_K, _V]]
415
+ | _CheckAnyValue[list[_E]]
416
+ | _CheckAnyValue[tuple[_E, ...]]
417
+ | _CheckAnyValue[set[_E]]
418
+ | _CheckAnyValue[frozenset[_E]]
419
+ | _CheckAnyValue[_FrameT_co]
420
+ | _CheckAnyValue[_ArrayT_co],
421
+ matcher: Matcher[Any] | Callable[[Any], object],
422
+ *,
423
+ allow_empty: bool = ...,
424
+ ) -> AssertionOutcome: ...
425
+ @overload
426
+ def each(
427
+ self: _CheckAnyValue[list[_E]]
428
+ | _CheckAnyValue[tuple[_E, ...]]
429
+ | _CheckAnyValue[set[_E]]
430
+ | _CheckAnyValue[frozenset[_E]],
431
+ matcher: Matcher[_E] | Callable[[_E], object],
432
+ *,
433
+ allow_empty: bool = ...,
434
+ ) -> AssertionOutcome: ...
435
+ @overload
436
+ def each(
437
+ self: _CheckAnyValue[_Capable], matcher: Matcher[Any] | Callable[[Any], object], *, allow_empty: bool = ...
438
+ ) -> AssertionOutcome: ...
439
+
440
+ @overload
441
+ def all_satisfy(
442
+ self: _CheckAnyValue[str], matcher: Matcher[str] | Callable[[str], object], *, allow_empty: bool = ...
443
+ ) -> AssertionOutcome: ...
444
+ @overload
445
+ def all_satisfy(
446
+ self: _CheckAnyValue[dict[_K, _V]],
447
+ matcher: Matcher[_K] | Callable[[_K], object],
448
+ *,
449
+ allow_empty: bool = ...,
450
+ ) -> AssertionOutcome: ...
451
+ @overload
452
+ def all_satisfy(
453
+ self: _CheckAnyValue[dict[_K, _V]]
454
+ | _CheckAnyValue[list[_E]]
455
+ | _CheckAnyValue[tuple[_E, ...]]
456
+ | _CheckAnyValue[set[_E]]
457
+ | _CheckAnyValue[frozenset[_E]]
458
+ | _CheckAnyValue[_FrameT_co]
459
+ | _CheckAnyValue[_ArrayT_co],
460
+ matcher: Matcher[Any] | Callable[[Any], object],
461
+ *,
462
+ allow_empty: bool = ...,
463
+ ) -> AssertionOutcome: ...
464
+ @overload
465
+ def all_satisfy(
466
+ self: _CheckAnyValue[list[_E]]
467
+ | _CheckAnyValue[tuple[_E, ...]]
468
+ | _CheckAnyValue[set[_E]]
469
+ | _CheckAnyValue[frozenset[_E]],
470
+ matcher: Matcher[_E] | Callable[[_E], object],
471
+ *,
472
+ allow_empty: bool = ...,
473
+ ) -> AssertionOutcome: ...
474
+ @overload
475
+ def all_satisfy(
476
+ self: _CheckAnyValue[_Capable], matcher: Matcher[Any] | Callable[[Any], object], *, allow_empty: bool = ...
477
+ ) -> AssertionOutcome: ...
478
+
479
+ @overload
480
+ def any_satisfy(
481
+ self: _CheckAnyValue[str], matcher: Matcher[str] | Callable[[str], object]
482
+ ) -> AssertionOutcome: ...
483
+ @overload
484
+ def any_satisfy(
485
+ self: _CheckAnyValue[list[_E]]
486
+ | _CheckAnyValue[tuple[_E, ...]]
487
+ | _CheckAnyValue[set[_E]]
488
+ | _CheckAnyValue[frozenset[_E]],
489
+ matcher: Matcher[_E] | Callable[[_E], object],
490
+ ) -> AssertionOutcome: ...
491
+ @overload
492
+ def any_satisfy(
493
+ self: _CheckAnyValue[_Capable], matcher: Matcher[str] | Callable[[str], object]
494
+ ) -> AssertionOutcome: ...
495
+
496
+ @overload
497
+ def none_satisfy(
498
+ self: _CheckAnyValue[str], matcher: Matcher[str] | Callable[[str], object]
499
+ ) -> AssertionOutcome: ...
500
+ @overload
501
+ def none_satisfy(
502
+ self: _CheckAnyValue[list[_E]]
503
+ | _CheckAnyValue[tuple[_E, ...]]
504
+ | _CheckAnyValue[set[_E]]
505
+ | _CheckAnyValue[frozenset[_E]],
506
+ matcher: Matcher[_E] | Callable[[_E], object],
507
+ ) -> AssertionOutcome: ...
508
+ @overload
509
+ def none_satisfy(
510
+ self: _CheckAnyValue[_Capable], matcher: Matcher[str] | Callable[[str], object]
511
+ ) -> AssertionOutcome: ...
512
+
513
+ @overload
514
+ def satisfies_exactly(
515
+ self: _CheckAnyValue[str], *matchers: Matcher[str] | Callable[[str], object]
516
+ ) -> AssertionOutcome: ...
517
+ @overload
518
+ def satisfies_exactly(
519
+ self: _CheckAnyValue[list[_E]]
520
+ | _CheckAnyValue[tuple[_E, ...]]
521
+ | _CheckAnyValue[set[_E]]
522
+ | _CheckAnyValue[frozenset[_E]],
523
+ *matchers: Matcher[_E] | Callable[[_E], object],
524
+ ) -> AssertionOutcome: ...
525
+ @overload
526
+ def satisfies_exactly(
527
+ self: _CheckAnyValue[_Capable], *matchers: Matcher[str] | Callable[[str], object]
528
+ ) -> AssertionOutcome: ...
529
+
530
+ @overload
531
+ def satisfies_exactly_in_any_order(
532
+ self: _CheckAnyValue[str], *matchers: Matcher[str] | Callable[[str], object]
533
+ ) -> AssertionOutcome: ...
534
+ @overload
535
+ def satisfies_exactly_in_any_order(
536
+ self: _CheckAnyValue[list[_E]]
537
+ | _CheckAnyValue[tuple[_E, ...]]
538
+ | _CheckAnyValue[set[_E]]
539
+ | _CheckAnyValue[frozenset[_E]],
540
+ *matchers: Matcher[_E] | Callable[[_E], object],
541
+ ) -> AssertionOutcome: ...
542
+ @overload
543
+ def satisfies_exactly_in_any_order(
544
+ self: _CheckAnyValue[_Capable], *matchers: Matcher[str] | Callable[[str], object]
545
+ ) -> AssertionOutcome: ...
546
+
547
+ @overload
548
+ def zip_satisfies(
549
+ self: _CheckAnyValue[str],
550
+ other: Iterable[_Other],
551
+ predicate: Callable[[str, _Other], object],
552
+ *,
553
+ allow_empty: bool = ...,
554
+ ) -> AssertionOutcome: ...
555
+ @overload
556
+ def zip_satisfies(
557
+ self: _CheckAnyValue[list[_E]]
558
+ | _CheckAnyValue[tuple[_E, ...]]
559
+ | _CheckAnyValue[set[_E]]
560
+ | _CheckAnyValue[frozenset[_E]],
561
+ other: Iterable[_Other],
562
+ predicate: Callable[[_E, _Other], object],
563
+ *,
564
+ allow_empty: bool = ...,
565
+ ) -> AssertionOutcome: ...
566
+ @overload
567
+ def zip_satisfies(
568
+ self: _CheckAnyValue[_Capable],
569
+ other: Iterable[_Other],
570
+ predicate: Callable[[str, _Other], object],
571
+ *,
572
+ allow_empty: bool = ...,
573
+ ) -> AssertionOutcome: ...
574
+
575
+ def extracting_group(
576
+ self: _CheckAnyValue[str], pattern: str | re.Pattern[str], group: int | str = ...
577
+ ) -> AssertionOutcome: ...
578
+
579
+ def matches_with_groups(self: _CheckAnyValue[str], pattern: str | re.Pattern[str]) -> AssertionOutcome: ...
580
+
581
+ @overload
582
+ def exists(self: _CheckAnyValue[str] | _CheckAnyValue[pathlib.Path]) -> AssertionOutcome: ...
583
+ @overload
584
+ def exists(self: _CheckAnyValue[_PathLike]) -> AssertionOutcome: ...
585
+
586
+ @overload
587
+ def does_not_exist(self: _CheckAnyValue[str] | _CheckAnyValue[pathlib.Path]) -> AssertionOutcome: ...
588
+ @overload
589
+ def does_not_exist(self: _CheckAnyValue[_PathLike]) -> AssertionOutcome: ...
590
+
591
+ @overload
592
+ def is_file(self: _CheckAnyValue[str] | _CheckAnyValue[pathlib.Path]) -> AssertionOutcome: ...
593
+ @overload
594
+ def is_file(self: _CheckAnyValue[_PathLike]) -> AssertionOutcome: ...
595
+
596
+ @overload
597
+ def is_directory(self: _CheckAnyValue[str] | _CheckAnyValue[pathlib.Path]) -> AssertionOutcome: ...
598
+ @overload
599
+ def is_directory(self: _CheckAnyValue[_PathLike]) -> AssertionOutcome: ...
600
+
601
+ @overload
602
+ def is_named(self: _CheckAnyValue[str] | _CheckAnyValue[pathlib.Path], filename: str) -> AssertionOutcome: ...
603
+ @overload
604
+ def is_named(self: _CheckAnyValue[_PathLike], filename: str) -> AssertionOutcome: ...
605
+
606
+ @overload
607
+ def is_child_of(
608
+ self: _CheckAnyValue[str] | _CheckAnyValue[pathlib.Path], parent: object
609
+ ) -> AssertionOutcome: ...
610
+ @overload
611
+ def is_child_of(self: _CheckAnyValue[_PathLike], parent: object) -> AssertionOutcome: ...
612
+
613
+ @overload
614
+ def is_readable(self: _CheckAnyValue[str] | _CheckAnyValue[pathlib.Path]) -> AssertionOutcome: ...
615
+ @overload
616
+ def is_readable(self: _CheckAnyValue[_PathLike]) -> AssertionOutcome: ...
617
+
618
+ @overload
619
+ def is_writable(self: _CheckAnyValue[str] | _CheckAnyValue[pathlib.Path]) -> AssertionOutcome: ...
620
+ @overload
621
+ def is_writable(self: _CheckAnyValue[_PathLike]) -> AssertionOutcome: ...
622
+
623
+ @overload
624
+ def is_executable(self: _CheckAnyValue[str] | _CheckAnyValue[pathlib.Path]) -> AssertionOutcome: ...
625
+ @overload
626
+ def is_executable(self: _CheckAnyValue[_PathLike]) -> AssertionOutcome: ...
627
+
628
+ @overload
629
+ def is_subset_of(
630
+ self: _CheckAnyValue[str]
631
+ | _CheckAnyValue[list[_E]]
632
+ | _CheckAnyValue[tuple[_E, ...]]
633
+ | _CheckAnyValue[set[_E]]
634
+ | _CheckAnyValue[frozenset[_E]]
635
+ | _CheckAnyValue[bytes]
636
+ | _CheckAnyValue[bytearray]
637
+ | _CheckAnyValue[_FrameT_co]
638
+ | _CheckAnyValue[_ArrayT_co],
639
+ *supersets: object,
640
+ allow_empty: bool = ...,
641
+ ) -> AssertionOutcome: ...
642
+ @overload
643
+ def is_subset_of(
644
+ self: _CheckAnyValue[dict[_K, _V]], *supersets: Mapping[Any, Any] | MappingLike, allow_empty: bool = ...
645
+ ) -> AssertionOutcome: ...
646
+ @overload
647
+ def is_subset_of(
648
+ self: _CheckAnyValue[_Capable], *supersets: object, allow_empty: bool = ...
649
+ ) -> AssertionOutcome: ...
650
+
651
+ @overload
652
+ def contains_duplicates(self: _CheckAnyValue[str]) -> AssertionOutcome: ...
653
+ @overload
654
+ def contains_duplicates(
655
+ self: _CheckAnyValue[list[_E]]
656
+ | _CheckAnyValue[tuple[_E, ...]]
657
+ | _CheckAnyValue[set[_E]]
658
+ | _CheckAnyValue[frozenset[_E]],
659
+ ) -> AssertionOutcome: ...
660
+ @overload
661
+ def contains_duplicates(self: _CheckAnyValue[_Capable]) -> AssertionOutcome: ...
662
+
663
+ @overload
664
+ def does_not_contain_duplicates(self: _CheckAnyValue[str]) -> AssertionOutcome: ...
665
+ @overload
666
+ def does_not_contain_duplicates(
667
+ self: _CheckAnyValue[list[_E]]
668
+ | _CheckAnyValue[tuple[_E, ...]]
669
+ | _CheckAnyValue[set[_E]]
670
+ | _CheckAnyValue[frozenset[_E]],
671
+ ) -> AssertionOutcome: ...
672
+ @overload
673
+ def does_not_contain_duplicates(self: _CheckAnyValue[_Capable]) -> AssertionOutcome: ...
674
+
675
+ @overload
676
+ def contains_only_once(self: _CheckAnyValue[str], *items: object) -> AssertionOutcome: ...
677
+ @overload
678
+ def contains_only_once(
679
+ self: _CheckAnyValue[list[_E]]
680
+ | _CheckAnyValue[tuple[_E, ...]]
681
+ | _CheckAnyValue[set[_E]]
682
+ | _CheckAnyValue[frozenset[_E]],
683
+ *items: object,
684
+ ) -> AssertionOutcome: ...
685
+ @overload
686
+ def contains_only_once(self: _CheckAnyValue[_Capable], *items: object) -> AssertionOutcome: ...
687
+
688
+ @overload
689
+ def contains_in_order(self: _CheckAnyValue[str], *items: str | Matcher[str]) -> AssertionOutcome: ...
690
+ @overload
691
+ def contains_in_order(
692
+ self: _CheckAnyValue[list[_E]]
693
+ | _CheckAnyValue[tuple[_E, ...]]
694
+ | _CheckAnyValue[set[_E]]
695
+ | _CheckAnyValue[frozenset[_E]],
696
+ *items: _E | Matcher[_E],
697
+ ) -> AssertionOutcome: ...
698
+ @overload
699
+ def contains_in_order(
700
+ self: _CheckAnyValue[Iterable[_E] | _Indexed[_E]], *items: _E | Matcher[_E]
701
+ ) -> AssertionOutcome: ...
702
+
703
+ @overload
704
+ def has_same_size_as(
705
+ self: _CheckAnyValue[str]
706
+ | _CheckAnyValue[dict[_K, _V]]
707
+ | _CheckAnyValue[list[_E]]
708
+ | _CheckAnyValue[tuple[_E, ...]]
709
+ | _CheckAnyValue[set[_E]]
710
+ | _CheckAnyValue[frozenset[_E]]
711
+ | _CheckAnyValue[bytes]
712
+ | _CheckAnyValue[bytearray]
713
+ | _CheckAnyValue[_FrameT_co]
714
+ | _CheckAnyValue[_ArrayT_co],
715
+ other: Sized,
716
+ ) -> AssertionOutcome: ...
717
+ @overload
718
+ def has_same_size_as(self: _CheckAnyValue[_Capable], other: Sized) -> AssertionOutcome: ...
719
+
720
+ @overload
721
+ def has_size_greater_than(
722
+ self: _CheckAnyValue[str]
723
+ | _CheckAnyValue[dict[_K, _V]]
724
+ | _CheckAnyValue[list[_E]]
725
+ | _CheckAnyValue[tuple[_E, ...]]
726
+ | _CheckAnyValue[set[_E]]
727
+ | _CheckAnyValue[frozenset[_E]]
728
+ | _CheckAnyValue[bytes]
729
+ | _CheckAnyValue[bytearray]
730
+ | _CheckAnyValue[_FrameT_co]
731
+ | _CheckAnyValue[_ArrayT_co],
732
+ size: SupportsIndex,
733
+ ) -> AssertionOutcome: ...
734
+ @overload
735
+ def has_size_greater_than(self: _CheckAnyValue[_Capable], size: SupportsIndex) -> AssertionOutcome: ...
736
+
737
+ @overload
738
+ def has_size_less_than(
739
+ self: _CheckAnyValue[str]
740
+ | _CheckAnyValue[dict[_K, _V]]
741
+ | _CheckAnyValue[list[_E]]
742
+ | _CheckAnyValue[tuple[_E, ...]]
743
+ | _CheckAnyValue[set[_E]]
744
+ | _CheckAnyValue[frozenset[_E]]
745
+ | _CheckAnyValue[bytes]
746
+ | _CheckAnyValue[bytearray]
747
+ | _CheckAnyValue[_FrameT_co]
748
+ | _CheckAnyValue[_ArrayT_co],
749
+ size: SupportsIndex,
750
+ ) -> AssertionOutcome: ...
751
+ @overload
752
+ def has_size_less_than(self: _CheckAnyValue[_Capable], size: SupportsIndex) -> AssertionOutcome: ...
753
+
754
+ @overload
755
+ def has_size_between(
756
+ self: _CheckAnyValue[str]
757
+ | _CheckAnyValue[dict[_K, _V]]
758
+ | _CheckAnyValue[list[_E]]
759
+ | _CheckAnyValue[tuple[_E, ...]]
760
+ | _CheckAnyValue[set[_E]]
761
+ | _CheckAnyValue[frozenset[_E]]
762
+ | _CheckAnyValue[bytes]
763
+ | _CheckAnyValue[bytearray]
764
+ | _CheckAnyValue[_FrameT_co]
765
+ | _CheckAnyValue[_ArrayT_co],
766
+ low: SupportsIndex,
767
+ high: SupportsIndex,
768
+ ) -> AssertionOutcome: ...
769
+ @overload
770
+ def has_size_between(
771
+ self: _CheckAnyValue[_Capable], low: SupportsIndex, high: SupportsIndex
772
+ ) -> AssertionOutcome: ...
773
+
774
+ @overload
775
+ def is_empty(
776
+ self: _CheckAnyValue[str]
777
+ | _CheckAnyValue[dict[_K, _V]]
778
+ | _CheckAnyValue[list[_E]]
779
+ | _CheckAnyValue[tuple[_E, ...]]
780
+ | _CheckAnyValue[set[_E]]
781
+ | _CheckAnyValue[frozenset[_E]]
782
+ | _CheckAnyValue[bytes]
783
+ | _CheckAnyValue[bytearray]
784
+ | _CheckAnyValue[_FrameT_co]
785
+ | _CheckAnyValue[_ArrayT_co],
786
+ ) -> AssertionOutcome: ...
787
+ @overload
788
+ def is_empty(self: _CheckAnyValue[_Capable]) -> AssertionOutcome: ...
789
+
790
+ @overload
791
+ def is_not_empty(
792
+ self: _CheckAnyValue[str]
793
+ | _CheckAnyValue[dict[_K, _V]]
794
+ | _CheckAnyValue[list[_E]]
795
+ | _CheckAnyValue[tuple[_E, ...]]
796
+ | _CheckAnyValue[set[_E]]
797
+ | _CheckAnyValue[frozenset[_E]]
798
+ | _CheckAnyValue[bytes]
799
+ | _CheckAnyValue[bytearray]
800
+ | _CheckAnyValue[_FrameT_co]
801
+ | _CheckAnyValue[_ArrayT_co],
802
+ ) -> AssertionOutcome: ...
803
+ @overload
804
+ def is_not_empty(self: _CheckAnyValue[_Capable]) -> AssertionOutcome: ...
805
+
806
+ @overload
807
+ def is_positive(
808
+ self: _CheckAnyValue[bool] | _CheckAnyValue[int] | _CheckAnyValue[float],
809
+ ) -> AssertionOutcome: ...
810
+ @overload
811
+ def is_positive(self: _CheckAnyValue[_Orderable]) -> AssertionOutcome: ...
812
+
813
+ @overload
814
+ def is_negative(
815
+ self: _CheckAnyValue[bool] | _CheckAnyValue[int] | _CheckAnyValue[float],
816
+ ) -> AssertionOutcome: ...
817
+ @overload
818
+ def is_negative(self: _CheckAnyValue[_Orderable]) -> AssertionOutcome: ...
819
+
820
+ @overload
821
+ def is_nan(self: _CheckAnyValue[bool] | _CheckAnyValue[int] | _CheckAnyValue[float]) -> AssertionOutcome: ...
822
+ @overload
823
+ def is_nan(self: _CheckAnyValue[SupportsFloat | SupportsIndex]) -> AssertionOutcome: ...
824
+
825
+ @overload
826
+ def is_not_nan(
827
+ self: _CheckAnyValue[bool] | _CheckAnyValue[int] | _CheckAnyValue[float],
828
+ ) -> AssertionOutcome: ...
829
+ @overload
830
+ def is_not_nan(self: _CheckAnyValue[SupportsFloat | SupportsIndex]) -> AssertionOutcome: ...
831
+
832
+ @overload
833
+ def is_inf(self: _CheckAnyValue[bool] | _CheckAnyValue[int] | _CheckAnyValue[float]) -> AssertionOutcome: ...
834
+ @overload
835
+ def is_inf(self: _CheckAnyValue[SupportsFloat | SupportsIndex]) -> AssertionOutcome: ...
836
+
837
+ @overload
838
+ def is_not_inf(
839
+ self: _CheckAnyValue[bool] | _CheckAnyValue[int] | _CheckAnyValue[float],
840
+ ) -> AssertionOutcome: ...
841
+ @overload
842
+ def is_not_inf(self: _CheckAnyValue[SupportsFloat | SupportsIndex]) -> AssertionOutcome: ...
843
+
844
+ @overload
845
+ def is_not_between(
846
+ self: _CheckAnyValue[bool] | _CheckAnyValue[int] | _CheckAnyValue[float], low: _Number, high: _Number
847
+ ) -> AssertionOutcome: ...
848
+ @overload
849
+ def is_not_between(
850
+ self: _CheckAnyValue[datetime.datetime], low: datetime.datetime, high: datetime.datetime
851
+ ) -> AssertionOutcome: ...
852
+ @overload
853
+ def is_not_between(
854
+ self: _CheckAnyValue[datetime.date], low: datetime.date, high: datetime.date
855
+ ) -> AssertionOutcome: ...
856
+ @overload
857
+ def is_not_between(self: _CheckAnyValue[_T], low: Any, high: Any) -> AssertionOutcome: ...
858
+ @overload
859
+ def is_not_between(self: _CheckAnyValue[_Capable], low: _Number, high: _Number) -> AssertionOutcome: ...
860
+
861
+ @overload
862
+ def is_between(
863
+ self: _CheckAnyValue[bool] | _CheckAnyValue[int] | _CheckAnyValue[float], low: _Number, high: _Number
864
+ ) -> AssertionOutcome: ...
865
+ @overload
866
+ def is_between(
867
+ self: _CheckAnyValue[datetime.datetime], low: datetime.datetime, high: datetime.datetime
868
+ ) -> AssertionOutcome: ...
869
+ @overload
870
+ def is_between(
871
+ self: _CheckAnyValue[datetime.date], low: datetime.date, high: datetime.date
872
+ ) -> AssertionOutcome: ...
873
+ @overload
874
+ def is_between(self: _CheckAnyValue[_T], low: Any, high: Any) -> AssertionOutcome: ...
875
+ @overload
876
+ def is_between(self: _CheckAnyValue[_Capable], low: _Number, high: _Number) -> AssertionOutcome: ...
877
+
878
+ @overload
879
+ def is_zero(
880
+ self: _CheckAnyValue[bool] | _CheckAnyValue[int] | _CheckAnyValue[float] | _CheckAnyValue[complex],
881
+ ) -> AssertionOutcome: ...
882
+ @overload
883
+ def is_zero(self: _CheckAnyValue[SupportsFloat | SupportsIndex]) -> AssertionOutcome: ...
884
+ @overload
885
+ def is_zero(self: _CheckAnyValue[_Capable]) -> AssertionOutcome: ...
886
+
887
+ @overload
888
+ def is_not_zero(
889
+ self: _CheckAnyValue[bool] | _CheckAnyValue[int] | _CheckAnyValue[float] | _CheckAnyValue[complex],
890
+ ) -> AssertionOutcome: ...
891
+ @overload
892
+ def is_not_zero(self: _CheckAnyValue[SupportsFloat | SupportsIndex]) -> AssertionOutcome: ...
893
+ @overload
894
+ def is_not_zero(self: _CheckAnyValue[_Capable]) -> AssertionOutcome: ...
895
+
896
+ @overload
897
+ def is_close_to(
898
+ self: _CheckAnyValue[int] | _CheckAnyValue[float],
899
+ other: _Number,
900
+ tolerance: _Number | None = ...,
901
+ *,
902
+ rel: _Number | None = ...,
903
+ ) -> AssertionOutcome: ...
904
+ @overload
905
+ def is_close_to(
906
+ self: _CheckAnyValue[datetime.datetime],
907
+ other: datetime.datetime,
908
+ tolerance: datetime.timedelta | None = ...,
909
+ *,
910
+ rel: None = ...,
911
+ ) -> AssertionOutcome: ...
912
+ @overload
913
+ def is_close_to(
914
+ self: _CheckAnyValue[SupportsFloat | SupportsIndex],
915
+ other: SupportsFloat | SupportsIndex,
916
+ tolerance: SupportsFloat | SupportsIndex | None = ...,
917
+ *,
918
+ rel: SupportsFloat | SupportsIndex | None = ...,
919
+ ) -> AssertionOutcome: ...
920
+ @overload
921
+ def is_close_to(
922
+ self: _CheckAnyValue[SupportsFloat | SupportsIndex],
923
+ other: _Number,
924
+ tolerance: _Number | None = ...,
925
+ *,
926
+ rel: _Number | None = ...,
927
+ ) -> AssertionOutcome: ...
928
+
929
+ @overload
930
+ def is_not_close_to(
931
+ self: _CheckAnyValue[int] | _CheckAnyValue[float],
932
+ other: _Number,
933
+ tolerance: _Number | None = ...,
934
+ *,
935
+ rel: _Number | None = ...,
936
+ ) -> AssertionOutcome: ...
937
+ @overload
938
+ def is_not_close_to(
939
+ self: _CheckAnyValue[datetime.datetime],
940
+ other: datetime.datetime,
941
+ tolerance: datetime.timedelta | None = ...,
942
+ *,
943
+ rel: None = ...,
944
+ ) -> AssertionOutcome: ...
945
+ @overload
946
+ def is_not_close_to(
947
+ self: _CheckAnyValue[SupportsFloat | SupportsIndex],
948
+ other: SupportsFloat | SupportsIndex,
949
+ tolerance: SupportsFloat | SupportsIndex | None = ...,
950
+ *,
951
+ rel: SupportsFloat | SupportsIndex | None = ...,
952
+ ) -> AssertionOutcome: ...
953
+ @overload
954
+ def is_not_close_to(
955
+ self: _CheckAnyValue[_Capable],
956
+ other: _Number,
957
+ tolerance: _Number | None = ...,
958
+ *,
959
+ rel: _Number | None = ...,
960
+ ) -> AssertionOutcome: ...
961
+
962
+ @overload
963
+ def is_even(self: _CheckAnyValue[int] | _CheckAnyValue[float]) -> AssertionOutcome: ...
964
+ @overload
965
+ def is_even(self: _CheckAnyValue[int]) -> AssertionOutcome: ...
966
+
967
+ @overload
968
+ def is_odd(self: _CheckAnyValue[int] | _CheckAnyValue[float]) -> AssertionOutcome: ...
969
+ @overload
970
+ def is_odd(self: _CheckAnyValue[int]) -> AssertionOutcome: ...
971
+
972
+ @overload
973
+ def is_divisible_by(
974
+ self: _CheckAnyValue[int] | _CheckAnyValue[float], divisor: SupportsIndex
975
+ ) -> AssertionOutcome: ...
976
+ @overload
977
+ def is_divisible_by(self: _CheckAnyValue[int], divisor: SupportsIndex) -> AssertionOutcome: ...
978
+
979
+ @overload
980
+ def contains_key(self: _CheckAnyValue[dict[_K, _V]], *keys: _K | Matcher[_K]) -> AssertionOutcome: ...
981
+ @overload
982
+ def contains_key(self: _CheckAnyValue[_Keyed], *keys: _K | Matcher[_K]) -> AssertionOutcome: ...
983
+
984
+ @overload
985
+ def does_not_contain_key(self: _CheckAnyValue[dict[_K, _V]], *keys: _K | Matcher[_K]) -> AssertionOutcome: ...
986
+ @overload
987
+ def does_not_contain_key(self: _CheckAnyValue[_Keyed], *keys: _K | Matcher[_K]) -> AssertionOutcome: ...
988
+
989
+ @overload
990
+ def contains_value(self: _CheckAnyValue[dict[_K, _V]], *values: _V | Matcher[_V]) -> AssertionOutcome: ...
991
+ @overload
992
+ def contains_value(self: _CheckAnyValue[_KeyedWithValues], *values: _V | Matcher[_V]) -> AssertionOutcome: ...
993
+
994
+ @overload
995
+ def does_not_contain_value(
996
+ self: _CheckAnyValue[dict[_K, _V]], *values: _V | Matcher[_V]
997
+ ) -> AssertionOutcome: ...
998
+ @overload
999
+ def does_not_contain_value(
1000
+ self: _CheckAnyValue[_KeyedWithValues], *values: _V | Matcher[_V]
1001
+ ) -> AssertionOutcome: ...
1002
+
1003
+ @overload
1004
+ def contains_entry(self: _CheckAnyValue[dict[_K, _V]], *args: object, **kwargs: object) -> AssertionOutcome: ...
1005
+ @overload
1006
+ def contains_entry(
1007
+ self: _CheckAnyValue[_KeyedWithItems], *args: object, **kwargs: object
1008
+ ) -> AssertionOutcome: ...
1009
+
1010
+ @overload
1011
+ def does_not_contain_entry(
1012
+ self: _CheckAnyValue[dict[_K, _V]], *args: object, **kwargs: object
1013
+ ) -> AssertionOutcome: ...
1014
+ @overload
1015
+ def does_not_contain_entry(
1016
+ self: _CheckAnyValue[_KeyedWithItems], *args: object, **kwargs: object
1017
+ ) -> AssertionOutcome: ...
1018
+
1019
+ @overload
1020
+ def matches_structure(self: _CheckAnyValue[dict[_K, _V]], spec: dict[Any, Any]) -> AssertionOutcome: ...
1021
+ @overload
1022
+ def matches_structure(self: _CheckAnyValue[_T], spec: dict[Any, Any]) -> AssertionOutcome: ...
1023
+ @overload
1024
+ def matches_structure(self: _CheckAnyValue[_Capable], spec: dict[Any, Any]) -> AssertionOutcome: ...
1025
+
1026
+ @overload
1027
+ def has_json_path(
1028
+ self: _CheckAnyValue[dict[_K, _V]]
1029
+ | _CheckAnyValue[list[_E]]
1030
+ | _CheckAnyValue[tuple[_E, ...]]
1031
+ | _CheckAnyValue[set[_E]]
1032
+ | _CheckAnyValue[frozenset[_E]],
1033
+ path: str,
1034
+ ) -> AssertionOutcome: ...
1035
+ @overload
1036
+ def has_json_path(self: _CheckAnyValue[_Capable], path: str) -> AssertionOutcome: ...
1037
+
1038
+ @overload
1039
+ def does_not_have_json_path(
1040
+ self: _CheckAnyValue[dict[_K, _V]]
1041
+ | _CheckAnyValue[list[_E]]
1042
+ | _CheckAnyValue[tuple[_E, ...]]
1043
+ | _CheckAnyValue[set[_E]]
1044
+ | _CheckAnyValue[frozenset[_E]],
1045
+ path: str,
1046
+ ) -> AssertionOutcome: ...
1047
+ @overload
1048
+ def does_not_have_json_path(self: _CheckAnyValue[_Capable], path: str) -> AssertionOutcome: ...
1049
+
1050
+ @overload
1051
+ def matches_json_schema(
1052
+ self: _CheckAnyValue[dict[_K, _V]]
1053
+ | _CheckAnyValue[list[_E]]
1054
+ | _CheckAnyValue[tuple[_E, ...]]
1055
+ | _CheckAnyValue[set[_E]]
1056
+ | _CheckAnyValue[frozenset[_E]],
1057
+ schema: dict[str, Any],
1058
+ ) -> AssertionOutcome: ...
1059
+ @overload
1060
+ def matches_json_schema(self: _CheckAnyValue[_Capable], schema: dict[str, Any]) -> AssertionOutcome: ...
1061
+
1062
+ @overload
1063
+ def matches_json_schema_from_file(
1064
+ self: _CheckAnyValue[dict[_K, _V]]
1065
+ | _CheckAnyValue[list[_E]]
1066
+ | _CheckAnyValue[tuple[_E, ...]]
1067
+ | _CheckAnyValue[set[_E]]
1068
+ | _CheckAnyValue[frozenset[_E]],
1069
+ path: str | Path,
1070
+ ) -> AssertionOutcome: ...
1071
+ @overload
1072
+ def matches_json_schema_from_file(self: _CheckAnyValue[_Capable], path: str | Path) -> AssertionOutcome: ...
1073
+
1074
+ @overload
1075
+ def conforms_to_openapi(
1076
+ self: _CheckAnyValue[dict[_K, _V]]
1077
+ | _CheckAnyValue[list[_E]]
1078
+ | _CheckAnyValue[tuple[_E, ...]]
1079
+ | _CheckAnyValue[set[_E]]
1080
+ | _CheckAnyValue[frozenset[_E]],
1081
+ spec: dict[str, Any],
1082
+ path: str,
1083
+ method: str,
1084
+ *,
1085
+ status: str | int | None = ...,
1086
+ content_type: str = ...,
1087
+ strict_nullable: bool = ...,
1088
+ ) -> AssertionOutcome: ...
1089
+ @overload
1090
+ def conforms_to_openapi(
1091
+ self: _CheckAnyValue[_Capable],
1092
+ spec: dict[str, Any],
1093
+ path: str,
1094
+ method: str,
1095
+ *,
1096
+ status: str | int | None = ...,
1097
+ content_type: str = ...,
1098
+ strict_nullable: bool = ...,
1099
+ ) -> AssertionOutcome: ...
1100
+
1101
+ def is_before(self: _CheckAnyValue[datetime.datetime], other: datetime.datetime) -> AssertionOutcome: ...
1102
+
1103
+ def is_after(self: _CheckAnyValue[datetime.datetime], other: datetime.datetime) -> AssertionOutcome: ...
1104
+
1105
+ def is_before_or_equal_to(
1106
+ self: _CheckAnyValue[datetime.datetime], other: datetime.datetime
1107
+ ) -> AssertionOutcome: ...
1108
+
1109
+ def is_after_or_equal_to(
1110
+ self: _CheckAnyValue[datetime.datetime], other: datetime.datetime
1111
+ ) -> AssertionOutcome: ...
1112
+
1113
+ def is_equal_to_ignoring_milliseconds(
1114
+ self: _CheckAnyValue[datetime.datetime], other: datetime.datetime
1115
+ ) -> AssertionOutcome: ...
1116
+
1117
+ def is_equal_to_ignoring_seconds(
1118
+ self: _CheckAnyValue[datetime.datetime], other: datetime.datetime
1119
+ ) -> AssertionOutcome: ...
1120
+
1121
+ def is_equal_to_ignoring_time(
1122
+ self: _CheckAnyValue[datetime.datetime], other: datetime.datetime
1123
+ ) -> AssertionOutcome: ...
1124
+
1125
+ @overload
1126
+ def is_valid_utf8(self: _CheckAnyValue[bytes] | _CheckAnyValue[bytearray]) -> AssertionOutcome: ...
1127
+ @overload
1128
+ def is_valid_utf8(self: _CheckAnyValue[bytes | bytearray]) -> AssertionOutcome: ...
1129
+
1130
+ @overload
1131
+ def is_valid_encoding(
1132
+ self: _CheckAnyValue[bytes] | _CheckAnyValue[bytearray], encoding: str
1133
+ ) -> AssertionOutcome: ...
1134
+ @overload
1135
+ def is_valid_encoding(self: _CheckAnyValue[bytes | bytearray], encoding: str) -> AssertionOutcome: ...
1136
+
1137
+ @overload
1138
+ def starts_with_bytes(
1139
+ self: _CheckAnyValue[bytes] | _CheckAnyValue[bytearray], prefix: bytes | bytearray
1140
+ ) -> AssertionOutcome: ...
1141
+ @overload
1142
+ def starts_with_bytes(
1143
+ self: _CheckAnyValue[bytes | bytearray], prefix: bytes | bytearray
1144
+ ) -> AssertionOutcome: ...
1145
+
1146
+ @overload
1147
+ def contains_bytes(
1148
+ self: _CheckAnyValue[bytes] | _CheckAnyValue[bytearray], sub: bytes | bytearray
1149
+ ) -> AssertionOutcome: ...
1150
+ @overload
1151
+ def contains_bytes(self: _CheckAnyValue[bytes | bytearray], sub: bytes | bytearray) -> AssertionOutcome: ...
1152
+
1153
+ @overload
1154
+ def has_byte_at(
1155
+ self: _CheckAnyValue[bytes] | _CheckAnyValue[bytearray], index: SupportsIndex, expected: SupportsIndex
1156
+ ) -> AssertionOutcome: ...
1157
+ @overload
1158
+ def has_byte_at(
1159
+ self: _CheckAnyValue[bytes | bytearray], index: SupportsIndex, expected: SupportsIndex
1160
+ ) -> AssertionOutcome: ...
1161
+
1162
+ @overload
1163
+ def is_hex_equal_to(
1164
+ self: _CheckAnyValue[bytes] | _CheckAnyValue[bytearray], expected_hex: str
1165
+ ) -> AssertionOutcome: ...
1166
+ @overload
1167
+ def is_hex_equal_to(self: _CheckAnyValue[bytes | bytearray], expected_hex: str) -> AssertionOutcome: ...
1168
+
1169
+ @overload
1170
+ def is_frame_equal(self: _CheckAnyValue[_FrameT_co], expected: object, **options: Any) -> AssertionOutcome: ...
1171
+ @overload
1172
+ def is_frame_equal(self: _CheckAnyValue[_Capable], expected: object, **options: Any) -> AssertionOutcome: ...
1173
+
1174
+ @overload
1175
+ def is_array_equal(
1176
+ self: _CheckAnyValue[_FrameT_co] | _CheckAnyValue[_ArrayT_co], expected: object, **options: Any
1177
+ ) -> AssertionOutcome: ...
1178
+ @overload
1179
+ def is_array_equal(self: _CheckAnyValue[_Capable], expected: object, **options: Any) -> AssertionOutcome: ...
1180
+
1181
+ @overload
1182
+ def is_array_close_to(
1183
+ self: _CheckAnyValue[_FrameT_co] | _CheckAnyValue[_ArrayT_co],
1184
+ expected: object,
1185
+ *,
1186
+ rtol: float = ...,
1187
+ atol: float = ...,
1188
+ equal_nan: bool = ...,
1189
+ **options: Any,
1190
+ ) -> AssertionOutcome: ...
1191
+ @overload
1192
+ def is_array_close_to(
1193
+ self: _CheckAnyValue[_Capable],
1194
+ expected: object,
1195
+ *,
1196
+ rtol: float = ...,
1197
+ atol: float = ...,
1198
+ equal_nan: bool = ...,
1199
+ **options: Any,
1200
+ ) -> AssertionOutcome: ...
1201
+
1202
+ @overload
1203
+ def is_not_none(self: _CheckAnyValue[str | None]) -> AssertionOutcome: ...
1204
+ @overload
1205
+ def is_not_none(self: _CheckAnyValue[bool | None]) -> AssertionOutcome: ...
1206
+ @overload
1207
+ def is_not_none(self: _CheckAnyValue[int | None]) -> AssertionOutcome: ...
1208
+ @overload
1209
+ def is_not_none(self: _CheckAnyValue[float | None]) -> AssertionOutcome: ...
1210
+ @overload
1211
+ def is_not_none(self: _CheckAnyValue[complex | None]) -> AssertionOutcome: ...
1212
+ @overload
1213
+ def is_not_none(self: _CheckAnyValue[dict[_K, _V] | None]) -> AssertionOutcome: ...
1214
+ @overload
1215
+ def is_not_none(self: _CheckAnyValue[list[_E] | tuple[_E, ...] | None]) -> AssertionOutcome: ...
1216
+ @overload
1217
+ def is_not_none(self: _CheckAnyValue[set[_E] | frozenset[_E] | None]) -> AssertionOutcome: ...
1218
+ @overload
1219
+ def is_not_none(self: _CheckAnyValue[datetime.datetime | None]) -> AssertionOutcome: ...
1220
+ @overload
1221
+ def is_not_none(self: _CheckAnyValue[datetime.date | None]) -> AssertionOutcome: ...
1222
+ @overload
1223
+ def is_not_none(self: _CheckAnyValue[Path | None]) -> AssertionOutcome: ...
1224
+ @overload
1225
+ def is_not_none(self: _CheckAnyValue[bytes | None]) -> AssertionOutcome: ...
1226
+ @overload
1227
+ def is_not_none(self: _CheckAnyValue[bytearray | None]) -> AssertionOutcome: ...
1228
+ @overload
1229
+ def is_not_none(self: _CheckAnyValue[Callable[..., object] | None]) -> AssertionOutcome: ...
1230
+ @overload
1231
+ def is_not_none(self: _CheckAnyValue[_U | None]) -> AssertionOutcome: ...
1232
+ @overload
1233
+ def is_not_none(self: _CheckAnyValue[_T]) -> AssertionOutcome: ...
1234
+ @overload
1235
+ def is_not_none(self) -> AssertionOutcome: ...
1236
+
1237
+ @overload
1238
+ def is_instance_of(self: _CheckAnyValue[_T], some_class: type[str]) -> AssertionOutcome: ...
1239
+ @overload
1240
+ def is_instance_of(self: _CheckAnyValue[_T], some_class: type[bool]) -> AssertionOutcome: ...
1241
+ @overload
1242
+ def is_instance_of(self: _CheckAnyValue[_T], some_class: type[int]) -> AssertionOutcome: ...
1243
+ @overload
1244
+ def is_instance_of(self: _CheckAnyValue[_T], some_class: type[float]) -> AssertionOutcome: ...
1245
+ @overload
1246
+ def is_instance_of(self: _CheckAnyValue[_T], some_class: type[complex]) -> AssertionOutcome: ...
1247
+ @overload
1248
+ def is_instance_of(self: _CheckAnyValue[_T], some_class: type[dict[_K, _V]]) -> AssertionOutcome: ...
1249
+ @overload
1250
+ def is_instance_of(
1251
+ self: _CheckAnyValue[_T], some_class: type[list[_E] | tuple[_E, ...]]
1252
+ ) -> AssertionOutcome: ...
1253
+ @overload
1254
+ def is_instance_of(self: _CheckAnyValue[_T], some_class: type[set[_E] | frozenset[_E]]) -> AssertionOutcome: ...
1255
+ @overload
1256
+ def is_instance_of(self: _CheckAnyValue[_T], some_class: type[datetime.datetime]) -> AssertionOutcome: ...
1257
+ @overload
1258
+ def is_instance_of(self: _CheckAnyValue[_T], some_class: type[datetime.date]) -> AssertionOutcome: ...
1259
+ @overload
1260
+ def is_instance_of(self: _CheckAnyValue[_T], some_class: type[Path]) -> AssertionOutcome: ...
1261
+ @overload
1262
+ def is_instance_of(self: _CheckAnyValue[_T], some_class: type[bytes]) -> AssertionOutcome: ...
1263
+ @overload
1264
+ def is_instance_of(self: _CheckAnyValue[_T], some_class: type[bytearray]) -> AssertionOutcome: ...
1265
+ @overload
1266
+ def is_instance_of(self: _CheckAnyValue[_T], some_class: tuple[type[_U], type[_U2]]) -> AssertionOutcome: ...
1267
+ @overload
1268
+ def is_instance_of(
1269
+ self: _CheckAnyValue[_T], some_class: tuple[type[_U], type[_U2], type[_U3]]
1270
+ ) -> AssertionOutcome: ...
1271
+ @overload
1272
+ def is_instance_of(self: _CheckAnyValue[_T], some_class: type[_U]) -> AssertionOutcome: ...
1273
+ @overload
1274
+ def is_instance_of(self: _CheckAnyValue[_T], some_class: ClassInfo) -> AssertionOutcome: ...
1275
+ @overload
1276
+ def is_instance_of(self, some_class: ClassInfo) -> AssertionOutcome: ...
1277
+
1278
+ @overload
1279
+ def is_instance_of_any(self: _CheckAnyValue[_T], first: type[_U], second: type[_U2], /) -> AssertionOutcome: ...
1280
+ @overload
1281
+ def is_instance_of_any(
1282
+ self: _CheckAnyValue[_T], first: type[_U], second: type[_U2], third: type[_U3], /
1283
+ ) -> AssertionOutcome: ...
1284
+ @overload
1285
+ def is_instance_of_any(self: _CheckAnyValue[_T], *some_classes: ClassInfo) -> AssertionOutcome: ...
1286
+ @overload
1287
+ def is_instance_of_any(self, *some_classes: ClassInfo) -> AssertionOutcome: ...
1288
+
1289
+ def is_equal_to(
1290
+ self,
1291
+ other: object,
1292
+ *,
1293
+ ignore: _KeySpecs | None = ...,
1294
+ include: _KeySpecs | None = ...,
1295
+ tolerance: float | None = ...,
1296
+ rel: float | None = ...,
1297
+ comparators: dict[Any, Callable[[Any, Any], Any]] | None = ...,
1298
+ ignore_null: bool = ...,
1299
+ strict_types: bool = ...,
1300
+ ) -> AssertionOutcome: ...
1301
+
1302
+ def is_not_equal_to(self, other: object) -> AssertionOutcome: ...
1303
+
1304
+ def is_same_as(self, other: object) -> AssertionOutcome: ...
1305
+
1306
+ def is_not_same_as(self, other: object) -> AssertionOutcome: ...
1307
+
1308
+ def is_true(self) -> AssertionOutcome: ...
1309
+
1310
+ def is_false(self) -> AssertionOutcome: ...
1311
+
1312
+ def is_none(self) -> AssertionOutcome: ...
1313
+
1314
+ def is_type_of(self, some_type: type) -> AssertionOutcome: ...
1315
+
1316
+ def is_subclass_of(self, some_class: ClassInfo) -> AssertionOutcome: ...
1317
+
1318
+ def is_length(self, length: SupportsIndex | Matcher[int]) -> AssertionOutcome: ...
1319
+
1320
+ def is_length_between(self, low: SupportsIndex, high: SupportsIndex) -> AssertionOutcome: ...
1321
+
1322
+ def is_callable(self) -> AssertionOutcome: ...
1323
+
1324
+ def is_not_callable(self) -> AssertionOutcome: ...
1325
+
1326
+ def is_iterable(self) -> AssertionOutcome: ...
1327
+
1328
+ def is_not_iterable(self) -> AssertionOutcome: ...
1329
+
1330
+ def all_fields_satisfy(
1331
+ self, matcher: Matcher[Any] | Callable[[Any], object], *, allow_empty: bool = ...
1332
+ ) -> AssertionOutcome: ...
1333
+
1334
+ def has_no_none_fields(self, *, allow_empty: bool = ...) -> AssertionOutcome: ...
1335
+
1336
+ def is_in(self, *items: object) -> AssertionOutcome: ...
1337
+
1338
+ def is_not_in(self, *items: object) -> AssertionOutcome: ...
1339
+
1340
+ def snapshot(
1341
+ self,
1342
+ id: str | None = ...,
1343
+ path: str = ...,
1344
+ *,
1345
+ ignore: _KeySpecs | None = ...,
1346
+ include: _KeySpecs | None = ...,
1347
+ tolerance: float | None = ...,
1348
+ rel: float | None = ...,
1349
+ comparators: dict[Any, Callable[[Any, Any], Any]] | None = ...,
1350
+ placeholders: Mapping[Any, Matcher[Any] | Callable[[Any], object]] | None = ...,
1351
+ ) -> AssertionOutcome: ...
1352
+
1353
+ def matches_contract_snapshot(self, id: str | None = ..., path: str = ...) -> AssertionOutcome: ...
1354
+
1355
+ def matches_inline(
1356
+ self,
1357
+ expected: object = ...,
1358
+ *,
1359
+ ignore: _KeySpecs | None = ...,
1360
+ include: _KeySpecs | None = ...,
1361
+ tolerance: float | None = ...,
1362
+ rel: float | None = ...,
1363
+ comparators: dict[Any, Callable[[Any, Any], Any]] | None = ...,
1364
+ placeholders: Mapping[Any, Matcher[Any] | Callable[[Any], object]] | None = ...,
1365
+ ) -> AssertionOutcome: ...