basedpyright 1.31.6 → 1.31.7

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. package/README.md +1 -1
  2. package/dist/pyright-langserver.js +1 -1
  3. package/dist/pyright-langserver.js.map +1 -1
  4. package/dist/pyright.js +1 -1
  5. package/dist/pyright.js.map +1 -1
  6. package/dist/typeshed-fallback/stdlib/_asyncio.pyi +6 -2
  7. package/dist/typeshed-fallback/stdlib/_compression.pyi +28 -28
  8. package/dist/typeshed-fallback/stdlib/_contextvars.pyi +6 -2
  9. package/dist/typeshed-fallback/stdlib/_ctypes.pyi +10 -51
  10. package/dist/typeshed-fallback/stdlib/_curses.pyi +187 -17
  11. package/dist/typeshed-fallback/stdlib/_decimal.pyi +7 -1
  12. package/dist/typeshed-fallback/stdlib/_heapq.pyi +20 -5
  13. package/dist/typeshed-fallback/stdlib/_interpqueues.pyi +6 -6
  14. package/dist/typeshed-fallback/stdlib/_interpreters.pyi +1 -7
  15. package/dist/typeshed-fallback/stdlib/_io.pyi +9 -5
  16. package/dist/typeshed-fallback/stdlib/_lsprof.pyi +12 -20
  17. package/dist/typeshed-fallback/stdlib/_operator.pyi +6 -2
  18. package/dist/typeshed-fallback/stdlib/_pickle.pyi +3 -3
  19. package/dist/typeshed-fallback/stdlib/_posixsubprocess.pyi +26 -26
  20. package/dist/typeshed-fallback/stdlib/_socket.pyi +6 -18
  21. package/dist/typeshed-fallback/stdlib/_stat.pyi +1 -1
  22. package/dist/typeshed-fallback/stdlib/_thread.pyi +10 -2
  23. package/dist/typeshed-fallback/stdlib/_zstd.pyi +300 -97
  24. package/dist/typeshed-fallback/stdlib/annotationlib.pyi +146 -146
  25. package/dist/typeshed-fallback/stdlib/ast.pyi +256 -96
  26. package/dist/typeshed-fallback/stdlib/asyncio/graph.pyi +28 -28
  27. package/dist/typeshed-fallback/stdlib/asyncio/tasks.pyi +3 -1
  28. package/dist/typeshed-fallback/stdlib/asyncio/tools.pyi +46 -46
  29. package/dist/typeshed-fallback/stdlib/builtins.pyi +46 -36
  30. package/dist/typeshed-fallback/stdlib/compression/_common/_streams.pyi +26 -26
  31. package/dist/typeshed-fallback/stdlib/compression/bz2.pyi +1 -1
  32. package/dist/typeshed-fallback/stdlib/compression/gzip.pyi +1 -1
  33. package/dist/typeshed-fallback/stdlib/compression/lzma.pyi +1 -1
  34. package/dist/typeshed-fallback/stdlib/compression/zlib.pyi +1 -1
  35. package/dist/typeshed-fallback/stdlib/compression/zstd/__init__.pyi +88 -88
  36. package/dist/typeshed-fallback/stdlib/compression/zstd/_zstdfile.pyi +117 -117
  37. package/dist/typeshed-fallback/stdlib/concurrent/futures/interpreter.pyi +79 -79
  38. package/dist/typeshed-fallback/stdlib/concurrent/futures/thread.pyi +8 -8
  39. package/dist/typeshed-fallback/stdlib/concurrent/interpreters/__init__.pyi +68 -68
  40. package/dist/typeshed-fallback/stdlib/concurrent/interpreters/_crossinterp.pyi +30 -30
  41. package/dist/typeshed-fallback/stdlib/concurrent/interpreters/_queues.pyi +74 -74
  42. package/dist/typeshed-fallback/stdlib/ctypes/__init__.pyi +7 -1
  43. package/dist/typeshed-fallback/stdlib/datetime.pyi +6 -2
  44. package/dist/typeshed-fallback/stdlib/decimal.pyi +12 -1
  45. package/dist/typeshed-fallback/stdlib/faulthandler.pyi +7 -5
  46. package/dist/typeshed-fallback/stdlib/functools.pyi +5 -9
  47. package/dist/typeshed-fallback/stdlib/gc.pyi +1 -1
  48. package/dist/typeshed-fallback/stdlib/marshal.pyi +6 -6
  49. package/dist/typeshed-fallback/stdlib/math.pyi +1 -3
  50. package/dist/typeshed-fallback/stdlib/multiprocessing/managers.pyi +3 -1
  51. package/dist/typeshed-fallback/stdlib/numbers.pyi +2 -10
  52. package/dist/typeshed-fallback/stdlib/os/__init__.pyi +15 -1
  53. package/dist/typeshed-fallback/stdlib/pathlib/__init__.pyi +6 -1
  54. package/dist/typeshed-fallback/stdlib/pathlib/types.pyi +8 -8
  55. package/dist/typeshed-fallback/stdlib/pyexpat/__init__.pyi +1 -1
  56. package/dist/typeshed-fallback/stdlib/string/templatelib.pyi +46 -36
  57. package/dist/typeshed-fallback/stdlib/sys/__init__.pyi +25 -2
  58. package/dist/typeshed-fallback/stdlib/tkinter/__init__.pyi +7 -1
  59. package/dist/typeshed-fallback/stdlib/types.pyi +22 -8
  60. package/dist/typeshed-fallback/stdlib/unicodedata.pyi +2 -2
  61. package/dist/typeshed-fallback/stdlib/winsound.pyi +4 -0
  62. package/dist/typeshed-fallback/stdlib/xxlimited.pyi +3 -16
  63. package/package.json +1 -1
@@ -40,7 +40,9 @@ if sys.version_info >= (3, 12):
40
40
  _field_types: ClassVar[dict[str, Any]]
41
41
 
42
42
  if sys.version_info >= (3, 14):
43
- def __replace__(self) -> Self: ...
43
+ def __replace__(self) -> Self:
44
+ """Return a copy of the AST node with new values for the specified fields."""
45
+ ...
44
46
 
45
47
  else:
46
48
  class AST:
@@ -62,7 +64,9 @@ class Module(mod):
62
64
  def __init__(self, body: list[stmt], type_ignores: list[TypeIgnore]) -> None: ...
63
65
 
64
66
  if sys.version_info >= (3, 14):
65
- def __replace__(self, *, body: list[stmt] = ..., type_ignores: list[TypeIgnore] = ...) -> Self: ...
67
+ def __replace__(self, *, body: list[stmt] = ..., type_ignores: list[TypeIgnore] = ...) -> Self:
68
+ """Return a copy of the AST node with new values for the specified fields."""
69
+ ...
66
70
 
67
71
  class Interactive(mod):
68
72
  if sys.version_info >= (3, 10):
@@ -74,7 +78,9 @@ class Interactive(mod):
74
78
  def __init__(self, body: list[stmt]) -> None: ...
75
79
 
76
80
  if sys.version_info >= (3, 14):
77
- def __replace__(self, *, body: list[stmt] = ...) -> Self: ...
81
+ def __replace__(self, *, body: list[stmt] = ...) -> Self:
82
+ """Return a copy of the AST node with new values for the specified fields."""
83
+ ...
78
84
 
79
85
  class Expression(mod):
80
86
  if sys.version_info >= (3, 10):
@@ -83,7 +89,9 @@ class Expression(mod):
83
89
  def __init__(self, body: expr) -> None: ...
84
90
 
85
91
  if sys.version_info >= (3, 14):
86
- def __replace__(self, *, body: expr = ...) -> Self: ...
92
+ def __replace__(self, *, body: expr = ...) -> Self:
93
+ """Return a copy of the AST node with new values for the specified fields."""
94
+ ...
87
95
 
88
96
  class FunctionType(mod):
89
97
  if sys.version_info >= (3, 10):
@@ -99,7 +107,9 @@ class FunctionType(mod):
99
107
  def __init__(self, argtypes: list[expr], returns: expr) -> None: ...
100
108
 
101
109
  if sys.version_info >= (3, 14):
102
- def __replace__(self, *, argtypes: list[expr] = ..., returns: expr = ...) -> Self: ...
110
+ def __replace__(self, *, argtypes: list[expr] = ..., returns: expr = ...) -> Self:
111
+ """Return a copy of the AST node with new values for the specified fields."""
112
+ ...
103
113
 
104
114
  class stmt(AST):
105
115
  lineno: int
@@ -109,7 +119,9 @@ class stmt(AST):
109
119
  def __init__(self, **kwargs: Unpack[_Attributes]) -> None: ...
110
120
 
111
121
  if sys.version_info >= (3, 14):
112
- def __replace__(self, **kwargs: Unpack[_Attributes]) -> Self: ...
122
+ def __replace__(self, **kwargs: Unpack[_Attributes]) -> Self:
123
+ """Return a copy of the AST node with new values for the specified fields."""
124
+ ...
113
125
 
114
126
  class FunctionDef(stmt):
115
127
  if sys.version_info >= (3, 12):
@@ -186,7 +198,9 @@ class FunctionDef(stmt):
186
198
  type_comment: str | None = ...,
187
199
  type_params: list[type_param] = ...,
188
200
  **kwargs: Unpack[_Attributes],
189
- ) -> Self: ...
201
+ ) -> Self:
202
+ """Return a copy of the AST node with new values for the specified fields."""
203
+ ...
190
204
 
191
205
  class AsyncFunctionDef(stmt):
192
206
  if sys.version_info >= (3, 12):
@@ -263,7 +277,9 @@ class AsyncFunctionDef(stmt):
263
277
  type_comment: str | None = ...,
264
278
  type_params: list[type_param] = ...,
265
279
  **kwargs: Unpack[_Attributes],
266
- ) -> Self: ...
280
+ ) -> Self:
281
+ """Return a copy of the AST node with new values for the specified fields."""
282
+ ...
267
283
 
268
284
  class ClassDef(stmt):
269
285
  if sys.version_info >= (3, 12):
@@ -321,7 +337,9 @@ class ClassDef(stmt):
321
337
  decorator_list: list[expr] = ...,
322
338
  type_params: list[type_param] = ...,
323
339
  **kwargs: Unpack[_Attributes],
324
- ) -> Self: ...
340
+ ) -> Self:
341
+ """Return a copy of the AST node with new values for the specified fields."""
342
+ ...
325
343
 
326
344
  class Return(stmt):
327
345
  if sys.version_info >= (3, 10):
@@ -330,7 +348,9 @@ class Return(stmt):
330
348
  def __init__(self, value: expr | None = None, **kwargs: Unpack[_Attributes]) -> None: ...
331
349
 
332
350
  if sys.version_info >= (3, 14):
333
- def __replace__(self, *, value: expr | None = ..., **kwargs: Unpack[_Attributes]) -> Self: ...
351
+ def __replace__(self, *, value: expr | None = ..., **kwargs: Unpack[_Attributes]) -> Self:
352
+ """Return a copy of the AST node with new values for the specified fields."""
353
+ ...
334
354
 
335
355
  class Delete(stmt):
336
356
  if sys.version_info >= (3, 10):
@@ -342,7 +362,9 @@ class Delete(stmt):
342
362
  def __init__(self, targets: list[expr], **kwargs: Unpack[_Attributes]) -> None: ...
343
363
 
344
364
  if sys.version_info >= (3, 14):
345
- def __replace__(self, *, targets: list[expr] = ..., **kwargs: Unpack[_Attributes]) -> Self: ...
365
+ def __replace__(self, *, targets: list[expr] = ..., **kwargs: Unpack[_Attributes]) -> Self:
366
+ """Return a copy of the AST node with new values for the specified fields."""
367
+ ...
346
368
 
347
369
  class Assign(stmt):
348
370
  if sys.version_info >= (3, 10):
@@ -367,7 +389,9 @@ class Assign(stmt):
367
389
  if sys.version_info >= (3, 14):
368
390
  def __replace__(
369
391
  self, *, targets: list[expr] = ..., value: expr = ..., type_comment: str | None = ..., **kwargs: Unpack[_Attributes]
370
- ) -> Self: ...
392
+ ) -> Self:
393
+ """Return a copy of the AST node with new values for the specified fields."""
394
+ ...
371
395
 
372
396
  if sys.version_info >= (3, 12):
373
397
  class TypeAlias(stmt):
@@ -397,7 +421,9 @@ if sys.version_info >= (3, 12):
397
421
  type_params: list[type_param] = ...,
398
422
  value: expr = ...,
399
423
  **kwargs: Unpack[_Attributes[int]],
400
- ) -> Self: ...
424
+ ) -> Self:
425
+ """Return a copy of the AST node with new values for the specified fields."""
426
+ ...
401
427
 
402
428
  class AugAssign(stmt):
403
429
  if sys.version_info >= (3, 10):
@@ -417,7 +443,9 @@ class AugAssign(stmt):
417
443
  op: operator = ...,
418
444
  value: expr = ...,
419
445
  **kwargs: Unpack[_Attributes],
420
- ) -> Self: ...
446
+ ) -> Self:
447
+ """Return a copy of the AST node with new values for the specified fields."""
448
+ ...
421
449
 
422
450
  class AnnAssign(stmt):
423
451
  if sys.version_info >= (3, 10):
@@ -455,7 +483,9 @@ class AnnAssign(stmt):
455
483
  value: expr | None = ...,
456
484
  simple: int = ...,
457
485
  **kwargs: Unpack[_Attributes],
458
- ) -> Self: ...
486
+ ) -> Self:
487
+ """Return a copy of the AST node with new values for the specified fields."""
488
+ ...
459
489
 
460
490
  class For(stmt):
461
491
  if sys.version_info >= (3, 10):
@@ -496,7 +526,9 @@ class For(stmt):
496
526
  orelse: list[stmt] = ...,
497
527
  type_comment: str | None = ...,
498
528
  **kwargs: Unpack[_Attributes],
499
- ) -> Self: ...
529
+ ) -> Self:
530
+ """Return a copy of the AST node with new values for the specified fields."""
531
+ ...
500
532
 
501
533
  class AsyncFor(stmt):
502
534
  if sys.version_info >= (3, 10):
@@ -537,7 +569,9 @@ class AsyncFor(stmt):
537
569
  orelse: list[stmt] = ...,
538
570
  type_comment: str | None = ...,
539
571
  **kwargs: Unpack[_Attributes],
540
- ) -> Self: ...
572
+ ) -> Self:
573
+ """Return a copy of the AST node with new values for the specified fields."""
574
+ ...
541
575
 
542
576
  class While(stmt):
543
577
  if sys.version_info >= (3, 10):
@@ -555,7 +589,9 @@ class While(stmt):
555
589
  if sys.version_info >= (3, 14):
556
590
  def __replace__(
557
591
  self, *, test: expr = ..., body: list[stmt] = ..., orelse: list[stmt] = ..., **kwargs: Unpack[_Attributes]
558
- ) -> Self: ...
592
+ ) -> Self:
593
+ """Return a copy of the AST node with new values for the specified fields."""
594
+ ...
559
595
 
560
596
  class If(stmt):
561
597
  if sys.version_info >= (3, 10):
@@ -573,7 +609,9 @@ class If(stmt):
573
609
  if sys.version_info >= (3, 14):
574
610
  def __replace__(
575
611
  self, *, test: expr = ..., body: list[stmt] = ..., orelse: list[stmt] = ..., **kwargs: Unpack[_Attributes]
576
- ) -> Self: ...
612
+ ) -> Self:
613
+ """Return a copy of the AST node with new values for the specified fields."""
614
+ ...
577
615
 
578
616
  class With(stmt):
579
617
  if sys.version_info >= (3, 10):
@@ -602,7 +640,9 @@ class With(stmt):
602
640
  body: list[stmt] = ...,
603
641
  type_comment: str | None = ...,
604
642
  **kwargs: Unpack[_Attributes],
605
- ) -> Self: ...
643
+ ) -> Self:
644
+ """Return a copy of the AST node with new values for the specified fields."""
645
+ ...
606
646
 
607
647
  class AsyncWith(stmt):
608
648
  if sys.version_info >= (3, 10):
@@ -631,7 +671,9 @@ class AsyncWith(stmt):
631
671
  body: list[stmt] = ...,
632
672
  type_comment: str | None = ...,
633
673
  **kwargs: Unpack[_Attributes],
634
- ) -> Self: ...
674
+ ) -> Self:
675
+ """Return a copy of the AST node with new values for the specified fields."""
676
+ ...
635
677
 
636
678
  class Raise(stmt):
637
679
  if sys.version_info >= (3, 10):
@@ -641,7 +683,9 @@ class Raise(stmt):
641
683
  def __init__(self, exc: expr | None = None, cause: expr | None = None, **kwargs: Unpack[_Attributes]) -> None: ...
642
684
 
643
685
  if sys.version_info >= (3, 14):
644
- def __replace__(self, *, exc: expr | None = ..., cause: expr | None = ..., **kwargs: Unpack[_Attributes]) -> Self: ...
686
+ def __replace__(self, *, exc: expr | None = ..., cause: expr | None = ..., **kwargs: Unpack[_Attributes]) -> Self:
687
+ """Return a copy of the AST node with new values for the specified fields."""
688
+ ...
645
689
 
646
690
  class Try(stmt):
647
691
  if sys.version_info >= (3, 10):
@@ -678,7 +722,9 @@ class Try(stmt):
678
722
  orelse: list[stmt] = ...,
679
723
  finalbody: list[stmt] = ...,
680
724
  **kwargs: Unpack[_Attributes],
681
- ) -> Self: ...
725
+ ) -> Self:
726
+ """Return a copy of the AST node with new values for the specified fields."""
727
+ ...
682
728
 
683
729
  if sys.version_info >= (3, 11):
684
730
  class TryStar(stmt):
@@ -715,7 +761,9 @@ if sys.version_info >= (3, 11):
715
761
  orelse: list[stmt] = ...,
716
762
  finalbody: list[stmt] = ...,
717
763
  **kwargs: Unpack[_Attributes],
718
- ) -> Self: ...
764
+ ) -> Self:
765
+ """Return a copy of the AST node with new values for the specified fields."""
766
+ ...
719
767
 
720
768
  class Assert(stmt):
721
769
  if sys.version_info >= (3, 10):
@@ -725,7 +773,9 @@ class Assert(stmt):
725
773
  def __init__(self, test: expr, msg: expr | None = None, **kwargs: Unpack[_Attributes]) -> None: ...
726
774
 
727
775
  if sys.version_info >= (3, 14):
728
- def __replace__(self, *, test: expr = ..., msg: expr | None = ..., **kwargs: Unpack[_Attributes]) -> Self: ...
776
+ def __replace__(self, *, test: expr = ..., msg: expr | None = ..., **kwargs: Unpack[_Attributes]) -> Self:
777
+ """Return a copy of the AST node with new values for the specified fields."""
778
+ ...
729
779
 
730
780
  class Import(stmt):
731
781
  if sys.version_info >= (3, 10):
@@ -737,7 +787,9 @@ class Import(stmt):
737
787
  def __init__(self, names: list[alias], **kwargs: Unpack[_Attributes]) -> None: ...
738
788
 
739
789
  if sys.version_info >= (3, 14):
740
- def __replace__(self, *, names: list[alias] = ..., **kwargs: Unpack[_Attributes]) -> Self: ...
790
+ def __replace__(self, *, names: list[alias] = ..., **kwargs: Unpack[_Attributes]) -> Self:
791
+ """Return a copy of the AST node with new values for the specified fields."""
792
+ ...
741
793
 
742
794
  class ImportFrom(stmt):
743
795
  if sys.version_info >= (3, 10):
@@ -763,7 +815,9 @@ class ImportFrom(stmt):
763
815
  if sys.version_info >= (3, 14):
764
816
  def __replace__(
765
817
  self, *, module: str | None = ..., names: list[alias] = ..., level: int = ..., **kwargs: Unpack[_Attributes]
766
- ) -> Self: ...
818
+ ) -> Self:
819
+ """Return a copy of the AST node with new values for the specified fields."""
820
+ ...
767
821
 
768
822
  class Global(stmt):
769
823
  if sys.version_info >= (3, 10):
@@ -775,7 +829,9 @@ class Global(stmt):
775
829
  def __init__(self, names: list[str], **kwargs: Unpack[_Attributes]) -> None: ...
776
830
 
777
831
  if sys.version_info >= (3, 14):
778
- def __replace__(self, *, names: list[str] = ..., **kwargs: Unpack[_Attributes]) -> Self: ...
832
+ def __replace__(self, *, names: list[str] = ..., **kwargs: Unpack[_Attributes]) -> Self:
833
+ """Return a copy of the AST node with new values for the specified fields."""
834
+ ...
779
835
 
780
836
  class Nonlocal(stmt):
781
837
  if sys.version_info >= (3, 10):
@@ -787,7 +843,9 @@ class Nonlocal(stmt):
787
843
  def __init__(self, names: list[str], **kwargs: Unpack[_Attributes]) -> None: ...
788
844
 
789
845
  if sys.version_info >= (3, 14):
790
- def __replace__(self, *, names: list[str] = ..., **kwargs: Unpack[_Attributes]) -> Self: ...
846
+ def __replace__(self, *, names: list[str] = ..., **kwargs: Unpack[_Attributes]) -> Self:
847
+ """Return a copy of the AST node with new values for the specified fields."""
848
+ ...
791
849
 
792
850
  class Expr(stmt):
793
851
  if sys.version_info >= (3, 10):
@@ -796,7 +854,9 @@ class Expr(stmt):
796
854
  def __init__(self, value: expr, **kwargs: Unpack[_Attributes]) -> None: ...
797
855
 
798
856
  if sys.version_info >= (3, 14):
799
- def __replace__(self, *, value: expr = ..., **kwargs: Unpack[_Attributes]) -> Self: ...
857
+ def __replace__(self, *, value: expr = ..., **kwargs: Unpack[_Attributes]) -> Self:
858
+ """Return a copy of the AST node with new values for the specified fields."""
859
+ ...
800
860
 
801
861
  class Pass(stmt): ...
802
862
  class Break(stmt): ...
@@ -810,7 +870,9 @@ class expr(AST):
810
870
  def __init__(self, **kwargs: Unpack[_Attributes]) -> None: ...
811
871
 
812
872
  if sys.version_info >= (3, 14):
813
- def __replace__(self, **kwargs: Unpack[_Attributes]) -> Self: ...
873
+ def __replace__(self, **kwargs: Unpack[_Attributes]) -> Self:
874
+ """Return a copy of the AST node with new values for the specified fields."""
875
+ ...
814
876
 
815
877
  class BoolOp(expr):
816
878
  if sys.version_info >= (3, 10):
@@ -823,7 +885,9 @@ class BoolOp(expr):
823
885
  def __init__(self, op: boolop, values: list[expr], **kwargs: Unpack[_Attributes]) -> None: ...
824
886
 
825
887
  if sys.version_info >= (3, 14):
826
- def __replace__(self, *, op: boolop = ..., values: list[expr] = ..., **kwargs: Unpack[_Attributes]) -> Self: ...
888
+ def __replace__(self, *, op: boolop = ..., values: list[expr] = ..., **kwargs: Unpack[_Attributes]) -> Self:
889
+ """Return a copy of the AST node with new values for the specified fields."""
890
+ ...
827
891
 
828
892
  class NamedExpr(expr):
829
893
  if sys.version_info >= (3, 10):
@@ -833,7 +897,9 @@ class NamedExpr(expr):
833
897
  def __init__(self, target: Name, value: expr, **kwargs: Unpack[_Attributes]) -> None: ...
834
898
 
835
899
  if sys.version_info >= (3, 14):
836
- def __replace__(self, *, target: Name = ..., value: expr = ..., **kwargs: Unpack[_Attributes]) -> Self: ...
900
+ def __replace__(self, *, target: Name = ..., value: expr = ..., **kwargs: Unpack[_Attributes]) -> Self:
901
+ """Return a copy of the AST node with new values for the specified fields."""
902
+ ...
837
903
 
838
904
  class BinOp(expr):
839
905
  if sys.version_info >= (3, 10):
@@ -846,7 +912,9 @@ class BinOp(expr):
846
912
  if sys.version_info >= (3, 14):
847
913
  def __replace__(
848
914
  self, *, left: expr = ..., op: operator = ..., right: expr = ..., **kwargs: Unpack[_Attributes]
849
- ) -> Self: ...
915
+ ) -> Self:
916
+ """Return a copy of the AST node with new values for the specified fields."""
917
+ ...
850
918
 
851
919
  class UnaryOp(expr):
852
920
  if sys.version_info >= (3, 10):
@@ -856,7 +924,9 @@ class UnaryOp(expr):
856
924
  def __init__(self, op: unaryop, operand: expr, **kwargs: Unpack[_Attributes]) -> None: ...
857
925
 
858
926
  if sys.version_info >= (3, 14):
859
- def __replace__(self, *, op: unaryop = ..., operand: expr = ..., **kwargs: Unpack[_Attributes]) -> Self: ...
927
+ def __replace__(self, *, op: unaryop = ..., operand: expr = ..., **kwargs: Unpack[_Attributes]) -> Self:
928
+ """Return a copy of the AST node with new values for the specified fields."""
929
+ ...
860
930
 
861
931
  class Lambda(expr):
862
932
  if sys.version_info >= (3, 10):
@@ -866,7 +936,9 @@ class Lambda(expr):
866
936
  def __init__(self, args: arguments, body: expr, **kwargs: Unpack[_Attributes]) -> None: ...
867
937
 
868
938
  if sys.version_info >= (3, 14):
869
- def __replace__(self, *, args: arguments = ..., body: expr = ..., **kwargs: Unpack[_Attributes]) -> Self: ...
939
+ def __replace__(self, *, args: arguments = ..., body: expr = ..., **kwargs: Unpack[_Attributes]) -> Self:
940
+ """Return a copy of the AST node with new values for the specified fields."""
941
+ ...
870
942
 
871
943
  class IfExp(expr):
872
944
  if sys.version_info >= (3, 10):
@@ -879,7 +951,9 @@ class IfExp(expr):
879
951
  if sys.version_info >= (3, 14):
880
952
  def __replace__(
881
953
  self, *, test: expr = ..., body: expr = ..., orelse: expr = ..., **kwargs: Unpack[_Attributes]
882
- ) -> Self: ...
954
+ ) -> Self:
955
+ """Return a copy of the AST node with new values for the specified fields."""
956
+ ...
883
957
 
884
958
  class Dict(expr):
885
959
  if sys.version_info >= (3, 10):
@@ -894,7 +968,9 @@ class Dict(expr):
894
968
  if sys.version_info >= (3, 14):
895
969
  def __replace__(
896
970
  self, *, keys: list[expr | None] = ..., values: list[expr] = ..., **kwargs: Unpack[_Attributes]
897
- ) -> Self: ...
971
+ ) -> Self:
972
+ """Return a copy of the AST node with new values for the specified fields."""
973
+ ...
898
974
 
899
975
  class Set(expr):
900
976
  if sys.version_info >= (3, 10):
@@ -906,7 +982,9 @@ class Set(expr):
906
982
  def __init__(self, elts: list[expr], **kwargs: Unpack[_Attributes]) -> None: ...
907
983
 
908
984
  if sys.version_info >= (3, 14):
909
- def __replace__(self, *, elts: list[expr] = ..., **kwargs: Unpack[_Attributes]) -> Self: ...
985
+ def __replace__(self, *, elts: list[expr] = ..., **kwargs: Unpack[_Attributes]) -> Self:
986
+ """Return a copy of the AST node with new values for the specified fields."""
987
+ ...
910
988
 
911
989
  class ListComp(expr):
912
990
  if sys.version_info >= (3, 10):
@@ -921,7 +999,9 @@ class ListComp(expr):
921
999
  if sys.version_info >= (3, 14):
922
1000
  def __replace__(
923
1001
  self, *, elt: expr = ..., generators: list[comprehension] = ..., **kwargs: Unpack[_Attributes]
924
- ) -> Self: ...
1002
+ ) -> Self:
1003
+ """Return a copy of the AST node with new values for the specified fields."""
1004
+ ...
925
1005
 
926
1006
  class SetComp(expr):
927
1007
  if sys.version_info >= (3, 10):
@@ -936,7 +1016,9 @@ class SetComp(expr):
936
1016
  if sys.version_info >= (3, 14):
937
1017
  def __replace__(
938
1018
  self, *, elt: expr = ..., generators: list[comprehension] = ..., **kwargs: Unpack[_Attributes]
939
- ) -> Self: ...
1019
+ ) -> Self:
1020
+ """Return a copy of the AST node with new values for the specified fields."""
1021
+ ...
940
1022
 
941
1023
  class DictComp(expr):
942
1024
  if sys.version_info >= (3, 10):
@@ -954,7 +1036,9 @@ class DictComp(expr):
954
1036
  if sys.version_info >= (3, 14):
955
1037
  def __replace__(
956
1038
  self, *, key: expr = ..., value: expr = ..., generators: list[comprehension] = ..., **kwargs: Unpack[_Attributes]
957
- ) -> Self: ...
1039
+ ) -> Self:
1040
+ """Return a copy of the AST node with new values for the specified fields."""
1041
+ ...
958
1042
 
959
1043
  class GeneratorExp(expr):
960
1044
  if sys.version_info >= (3, 10):
@@ -969,7 +1053,9 @@ class GeneratorExp(expr):
969
1053
  if sys.version_info >= (3, 14):
970
1054
  def __replace__(
971
1055
  self, *, elt: expr = ..., generators: list[comprehension] = ..., **kwargs: Unpack[_Attributes]
972
- ) -> Self: ...
1056
+ ) -> Self:
1057
+ """Return a copy of the AST node with new values for the specified fields."""
1058
+ ...
973
1059
 
974
1060
  class Await(expr):
975
1061
  if sys.version_info >= (3, 10):
@@ -978,7 +1064,9 @@ class Await(expr):
978
1064
  def __init__(self, value: expr, **kwargs: Unpack[_Attributes]) -> None: ...
979
1065
 
980
1066
  if sys.version_info >= (3, 14):
981
- def __replace__(self, *, value: expr = ..., **kwargs: Unpack[_Attributes]) -> Self: ...
1067
+ def __replace__(self, *, value: expr = ..., **kwargs: Unpack[_Attributes]) -> Self:
1068
+ """Return a copy of the AST node with new values for the specified fields."""
1069
+ ...
982
1070
 
983
1071
  class Yield(expr):
984
1072
  if sys.version_info >= (3, 10):
@@ -987,7 +1075,9 @@ class Yield(expr):
987
1075
  def __init__(self, value: expr | None = None, **kwargs: Unpack[_Attributes]) -> None: ...
988
1076
 
989
1077
  if sys.version_info >= (3, 14):
990
- def __replace__(self, *, value: expr | None = ..., **kwargs: Unpack[_Attributes]) -> Self: ...
1078
+ def __replace__(self, *, value: expr | None = ..., **kwargs: Unpack[_Attributes]) -> Self:
1079
+ """Return a copy of the AST node with new values for the specified fields."""
1080
+ ...
991
1081
 
992
1082
  class YieldFrom(expr):
993
1083
  if sys.version_info >= (3, 10):
@@ -996,7 +1086,9 @@ class YieldFrom(expr):
996
1086
  def __init__(self, value: expr, **kwargs: Unpack[_Attributes]) -> None: ...
997
1087
 
998
1088
  if sys.version_info >= (3, 14):
999
- def __replace__(self, *, value: expr = ..., **kwargs: Unpack[_Attributes]) -> Self: ...
1089
+ def __replace__(self, *, value: expr = ..., **kwargs: Unpack[_Attributes]) -> Self:
1090
+ """Return a copy of the AST node with new values for the specified fields."""
1091
+ ...
1000
1092
 
1001
1093
  class Compare(expr):
1002
1094
  if sys.version_info >= (3, 10):
@@ -1014,7 +1106,9 @@ class Compare(expr):
1014
1106
  if sys.version_info >= (3, 14):
1015
1107
  def __replace__(
1016
1108
  self, *, left: expr = ..., ops: list[cmpop] = ..., comparators: list[expr] = ..., **kwargs: Unpack[_Attributes]
1017
- ) -> Self: ...
1109
+ ) -> Self:
1110
+ """Return a copy of the AST node with new values for the specified fields."""
1111
+ ...
1018
1112
 
1019
1113
  class Call(expr):
1020
1114
  if sys.version_info >= (3, 10):
@@ -1032,7 +1126,9 @@ class Call(expr):
1032
1126
  if sys.version_info >= (3, 14):
1033
1127
  def __replace__(
1034
1128
  self, *, func: expr = ..., args: list[expr] = ..., keywords: list[keyword] = ..., **kwargs: Unpack[_Attributes]
1035
- ) -> Self: ...
1129
+ ) -> Self:
1130
+ """Return a copy of the AST node with new values for the specified fields."""
1131
+ ...
1036
1132
 
1037
1133
  class FormattedValue(expr):
1038
1134
  if sys.version_info >= (3, 10):
@@ -1045,7 +1141,9 @@ class FormattedValue(expr):
1045
1141
  if sys.version_info >= (3, 14):
1046
1142
  def __replace__(
1047
1143
  self, *, value: expr = ..., conversion: int = ..., format_spec: expr | None = ..., **kwargs: Unpack[_Attributes]
1048
- ) -> Self: ...
1144
+ ) -> Self:
1145
+ """Return a copy of the AST node with new values for the specified fields."""
1146
+ ...
1049
1147
 
1050
1148
  class JoinedStr(expr):
1051
1149
  if sys.version_info >= (3, 10):
@@ -1057,14 +1155,18 @@ class JoinedStr(expr):
1057
1155
  def __init__(self, values: list[expr], **kwargs: Unpack[_Attributes]) -> None: ...
1058
1156
 
1059
1157
  if sys.version_info >= (3, 14):
1060
- def __replace__(self, *, values: list[expr] = ..., **kwargs: Unpack[_Attributes]) -> Self: ...
1158
+ def __replace__(self, *, values: list[expr] = ..., **kwargs: Unpack[_Attributes]) -> Self:
1159
+ """Return a copy of the AST node with new values for the specified fields."""
1160
+ ...
1061
1161
 
1062
1162
  if sys.version_info >= (3, 14):
1063
1163
  class TemplateStr(expr):
1064
1164
  __match_args__ = ("values",)
1065
1165
  values: list[expr]
1066
1166
  def __init__(self, values: list[expr] = ..., **kwargs: Unpack[_Attributes]) -> None: ...
1067
- def __replace__(self, *, values: list[expr] = ..., **kwargs: Unpack[_Attributes]) -> Self: ...
1167
+ def __replace__(self, *, values: list[expr] = ..., **kwargs: Unpack[_Attributes]) -> Self:
1168
+ """Return a copy of the AST node with new values for the specified fields."""
1169
+ ...
1068
1170
 
1069
1171
  class Interpolation(expr):
1070
1172
  __match_args__ = ("value", "str", "conversion", "format_spec")
@@ -1088,7 +1190,9 @@ if sys.version_info >= (3, 14):
1088
1190
  conversion: int = ...,
1089
1191
  format_spec: expr | None = ...,
1090
1192
  **kwargs: Unpack[_Attributes],
1091
- ) -> Self: ...
1193
+ ) -> Self:
1194
+ """Return a copy of the AST node with new values for the specified fields."""
1195
+ ...
1092
1196
 
1093
1197
  if sys.version_info >= (3, 10):
1094
1198
  from types import EllipsisType
@@ -1107,29 +1211,23 @@ class Constant(expr):
1107
1211
  # Aliases for value, for backwards compatibility
1108
1212
  @property
1109
1213
  @deprecated("Removed in Python 3.14. Use `value` instead.")
1110
- def n(self) -> _ConstantValue:
1111
- """Deprecated. Use value instead."""
1112
- ...
1214
+ def n(self) -> _ConstantValue: ...
1113
1215
  @n.setter
1114
1216
  @deprecated("Removed in Python 3.14. Use `value` instead.")
1115
- def n(self, value: _ConstantValue) -> None:
1116
- """Deprecated. Use value instead."""
1117
- ...
1217
+ def n(self, value: _ConstantValue) -> None: ...
1118
1218
  @property
1119
1219
  @deprecated("Removed in Python 3.14. Use `value` instead.")
1120
- def s(self) -> _ConstantValue:
1121
- """Deprecated. Use value instead."""
1122
- ...
1220
+ def s(self) -> _ConstantValue: ...
1123
1221
  @s.setter
1124
1222
  @deprecated("Removed in Python 3.14. Use `value` instead.")
1125
- def s(self, value: _ConstantValue) -> None:
1126
- """Deprecated. Use value instead."""
1127
- ...
1223
+ def s(self, value: _ConstantValue) -> None: ...
1128
1224
 
1129
1225
  def __init__(self, value: _ConstantValue, kind: str | None = None, **kwargs: Unpack[_Attributes]) -> None: ...
1130
1226
 
1131
1227
  if sys.version_info >= (3, 14):
1132
- def __replace__(self, *, value: _ConstantValue = ..., kind: str | None = ..., **kwargs: Unpack[_Attributes]) -> Self: ...
1228
+ def __replace__(self, *, value: _ConstantValue = ..., kind: str | None = ..., **kwargs: Unpack[_Attributes]) -> Self:
1229
+ """Return a copy of the AST node with new values for the specified fields."""
1230
+ ...
1133
1231
 
1134
1232
  class Attribute(expr):
1135
1233
  if sys.version_info >= (3, 10):
@@ -1142,7 +1240,9 @@ class Attribute(expr):
1142
1240
  if sys.version_info >= (3, 14):
1143
1241
  def __replace__(
1144
1242
  self, *, value: expr = ..., attr: str = ..., ctx: expr_context = ..., **kwargs: Unpack[_Attributes]
1145
- ) -> Self: ...
1243
+ ) -> Self:
1244
+ """Return a copy of the AST node with new values for the specified fields."""
1245
+ ...
1146
1246
 
1147
1247
  class Subscript(expr):
1148
1248
  if sys.version_info >= (3, 10):
@@ -1155,7 +1255,9 @@ class Subscript(expr):
1155
1255
  if sys.version_info >= (3, 14):
1156
1256
  def __replace__(
1157
1257
  self, *, value: expr = ..., slice: expr = ..., ctx: expr_context = ..., **kwargs: Unpack[_Attributes]
1158
- ) -> Self: ...
1258
+ ) -> Self:
1259
+ """Return a copy of the AST node with new values for the specified fields."""
1260
+ ...
1159
1261
 
1160
1262
  class Starred(expr):
1161
1263
  if sys.version_info >= (3, 10):
@@ -1165,7 +1267,9 @@ class Starred(expr):
1165
1267
  def __init__(self, value: expr, ctx: expr_context = ..., **kwargs: Unpack[_Attributes]) -> None: ...
1166
1268
 
1167
1269
  if sys.version_info >= (3, 14):
1168
- def __replace__(self, *, value: expr = ..., ctx: expr_context = ..., **kwargs: Unpack[_Attributes]) -> Self: ...
1270
+ def __replace__(self, *, value: expr = ..., ctx: expr_context = ..., **kwargs: Unpack[_Attributes]) -> Self:
1271
+ """Return a copy of the AST node with new values for the specified fields."""
1272
+ ...
1169
1273
 
1170
1274
  class Name(expr):
1171
1275
  if sys.version_info >= (3, 10):
@@ -1175,7 +1279,9 @@ class Name(expr):
1175
1279
  def __init__(self, id: str, ctx: expr_context = ..., **kwargs: Unpack[_Attributes]) -> None: ...
1176
1280
 
1177
1281
  if sys.version_info >= (3, 14):
1178
- def __replace__(self, *, id: str = ..., ctx: expr_context = ..., **kwargs: Unpack[_Attributes]) -> Self: ...
1282
+ def __replace__(self, *, id: str = ..., ctx: expr_context = ..., **kwargs: Unpack[_Attributes]) -> Self:
1283
+ """Return a copy of the AST node with new values for the specified fields."""
1284
+ ...
1179
1285
 
1180
1286
  class List(expr):
1181
1287
  if sys.version_info >= (3, 10):
@@ -1188,7 +1294,9 @@ class List(expr):
1188
1294
  def __init__(self, elts: list[expr], ctx: expr_context = ..., **kwargs: Unpack[_Attributes]) -> None: ...
1189
1295
 
1190
1296
  if sys.version_info >= (3, 14):
1191
- def __replace__(self, *, elts: list[expr] = ..., ctx: expr_context = ..., **kwargs: Unpack[_Attributes]) -> Self: ...
1297
+ def __replace__(self, *, elts: list[expr] = ..., ctx: expr_context = ..., **kwargs: Unpack[_Attributes]) -> Self:
1298
+ """Return a copy of the AST node with new values for the specified fields."""
1299
+ ...
1192
1300
 
1193
1301
  class Tuple(expr):
1194
1302
  if sys.version_info >= (3, 10):
@@ -1202,7 +1310,9 @@ class Tuple(expr):
1202
1310
  def __init__(self, elts: list[expr], ctx: expr_context = ..., **kwargs: Unpack[_Attributes]) -> None: ...
1203
1311
 
1204
1312
  if sys.version_info >= (3, 14):
1205
- def __replace__(self, *, elts: list[expr] = ..., ctx: expr_context = ..., **kwargs: Unpack[_Attributes]) -> Self: ...
1313
+ def __replace__(self, *, elts: list[expr] = ..., ctx: expr_context = ..., **kwargs: Unpack[_Attributes]) -> Self:
1314
+ """Return a copy of the AST node with new values for the specified fields."""
1315
+ ...
1206
1316
 
1207
1317
  @deprecated("Deprecated since Python 3.9.")
1208
1318
  class slice(AST): ...
@@ -1220,7 +1330,9 @@ class Slice(expr):
1220
1330
  if sys.version_info >= (3, 14):
1221
1331
  def __replace__(
1222
1332
  self, *, lower: expr | None = ..., upper: expr | None = ..., step: expr | None = ..., **kwargs: Unpack[_Attributes]
1223
- ) -> Self: ...
1333
+ ) -> Self:
1334
+ """Return a copy of the AST node with new values for the specified fields."""
1335
+ ...
1224
1336
 
1225
1337
  @deprecated("Deprecated since Python 3.9. Use `ast.Tuple` instead.")
1226
1338
  class ExtSlice(slice):
@@ -1297,7 +1409,9 @@ class comprehension(AST):
1297
1409
  def __init__(self, target: expr, iter: expr, ifs: list[expr], is_async: int) -> None: ...
1298
1410
 
1299
1411
  if sys.version_info >= (3, 14):
1300
- def __replace__(self, *, target: expr = ..., iter: expr = ..., ifs: list[expr] = ..., is_async: int = ...) -> Self: ...
1412
+ def __replace__(self, *, target: expr = ..., iter: expr = ..., ifs: list[expr] = ..., is_async: int = ...) -> Self:
1413
+ """Return a copy of the AST node with new values for the specified fields."""
1414
+ ...
1301
1415
 
1302
1416
  class excepthandler(AST):
1303
1417
  lineno: int
@@ -1309,7 +1423,9 @@ class excepthandler(AST):
1309
1423
  if sys.version_info >= (3, 14):
1310
1424
  def __replace__(
1311
1425
  self, *, lineno: int = ..., col_offset: int = ..., end_lineno: int | None = ..., end_col_offset: int | None = ...
1312
- ) -> Self: ...
1426
+ ) -> Self:
1427
+ """Return a copy of the AST node with new values for the specified fields."""
1428
+ ...
1313
1429
 
1314
1430
  class ExceptHandler(excepthandler):
1315
1431
  if sys.version_info >= (3, 10):
@@ -1332,7 +1448,9 @@ class ExceptHandler(excepthandler):
1332
1448
  if sys.version_info >= (3, 14):
1333
1449
  def __replace__(
1334
1450
  self, *, type: expr | None = ..., name: str | None = ..., body: list[stmt] = ..., **kwargs: Unpack[_Attributes]
1335
- ) -> Self: ...
1451
+ ) -> Self:
1452
+ """Return a copy of the AST node with new values for the specified fields."""
1453
+ ...
1336
1454
 
1337
1455
  class arguments(AST):
1338
1456
  if sys.version_info >= (3, 10):
@@ -1403,7 +1521,9 @@ class arguments(AST):
1403
1521
  kw_defaults: list[expr | None] = ...,
1404
1522
  kwarg: arg | None = ...,
1405
1523
  defaults: list[expr] = ...,
1406
- ) -> Self: ...
1524
+ ) -> Self:
1525
+ """Return a copy of the AST node with new values for the specified fields."""
1526
+ ...
1407
1527
 
1408
1528
  class arg(AST):
1409
1529
  lineno: int
@@ -1422,7 +1542,9 @@ class arg(AST):
1422
1542
  if sys.version_info >= (3, 14):
1423
1543
  def __replace__(
1424
1544
  self, *, arg: str = ..., annotation: expr | None = ..., type_comment: str | None = ..., **kwargs: Unpack[_Attributes]
1425
- ) -> Self: ...
1545
+ ) -> Self:
1546
+ """Return a copy of the AST node with new values for the specified fields."""
1547
+ ...
1426
1548
 
1427
1549
  class keyword(AST):
1428
1550
  lineno: int
@@ -1439,7 +1561,9 @@ class keyword(AST):
1439
1561
  def __init__(self, arg: str | None = None, *, value: expr, **kwargs: Unpack[_Attributes]) -> None: ...
1440
1562
 
1441
1563
  if sys.version_info >= (3, 14):
1442
- def __replace__(self, *, arg: str | None = ..., value: expr = ..., **kwargs: Unpack[_Attributes]) -> Self: ...
1564
+ def __replace__(self, *, arg: str | None = ..., value: expr = ..., **kwargs: Unpack[_Attributes]) -> Self:
1565
+ """Return a copy of the AST node with new values for the specified fields."""
1566
+ ...
1443
1567
 
1444
1568
  class alias(AST):
1445
1569
  name: str
@@ -1457,7 +1581,9 @@ class alias(AST):
1457
1581
  def __init__(self, name: str, asname: str | None = None) -> None: ...
1458
1582
 
1459
1583
  if sys.version_info >= (3, 14):
1460
- def __replace__(self, *, name: str = ..., asname: str | None = ..., **kwargs: Unpack[_Attributes]) -> Self: ...
1584
+ def __replace__(self, *, name: str = ..., asname: str | None = ..., **kwargs: Unpack[_Attributes]) -> Self:
1585
+ """Return a copy of the AST node with new values for the specified fields."""
1586
+ ...
1461
1587
 
1462
1588
  class withitem(AST):
1463
1589
  if sys.version_info >= (3, 10):
@@ -1467,7 +1593,9 @@ class withitem(AST):
1467
1593
  def __init__(self, context_expr: expr, optional_vars: expr | None = None) -> None: ...
1468
1594
 
1469
1595
  if sys.version_info >= (3, 14):
1470
- def __replace__(self, *, context_expr: expr = ..., optional_vars: expr | None = ...) -> Self: ...
1596
+ def __replace__(self, *, context_expr: expr = ..., optional_vars: expr | None = ...) -> Self:
1597
+ """Return a copy of the AST node with new values for the specified fields."""
1598
+ ...
1471
1599
 
1472
1600
  if sys.version_info >= (3, 10):
1473
1601
  class pattern(AST):
@@ -1480,7 +1608,9 @@ if sys.version_info >= (3, 10):
1480
1608
  if sys.version_info >= (3, 14):
1481
1609
  def __replace__(
1482
1610
  self, *, lineno: int = ..., col_offset: int = ..., end_lineno: int = ..., end_col_offset: int = ...
1483
- ) -> Self: ...
1611
+ ) -> Self:
1612
+ """Return a copy of the AST node with new values for the specified fields."""
1613
+ ...
1484
1614
 
1485
1615
  class match_case(AST):
1486
1616
  __match_args__ = ("pattern", "guard", "body")
@@ -1496,7 +1626,9 @@ if sys.version_info >= (3, 10):
1496
1626
  def __init__(self, pattern: ast.pattern, guard: expr | None = None, *, body: list[stmt]) -> None: ...
1497
1627
 
1498
1628
  if sys.version_info >= (3, 14):
1499
- def __replace__(self, *, pattern: ast.pattern = ..., guard: expr | None = ..., body: list[stmt] = ...) -> Self: ...
1629
+ def __replace__(self, *, pattern: ast.pattern = ..., guard: expr | None = ..., body: list[stmt] = ...) -> Self:
1630
+ """Return a copy of the AST node with new values for the specified fields."""
1631
+ ...
1500
1632
 
1501
1633
  class Match(stmt):
1502
1634
  __match_args__ = ("subject", "cases")
@@ -1510,7 +1642,9 @@ if sys.version_info >= (3, 10):
1510
1642
  if sys.version_info >= (3, 14):
1511
1643
  def __replace__(
1512
1644
  self, *, subject: expr = ..., cases: list[match_case] = ..., **kwargs: Unpack[_Attributes]
1513
- ) -> Self: ...
1645
+ ) -> Self:
1646
+ """Return a copy of the AST node with new values for the specified fields."""
1647
+ ...
1514
1648
 
1515
1649
  class MatchValue(pattern):
1516
1650
  __match_args__ = ("value",)
@@ -1518,7 +1652,9 @@ if sys.version_info >= (3, 10):
1518
1652
  def __init__(self, value: expr, **kwargs: Unpack[_Attributes[int]]) -> None: ...
1519
1653
 
1520
1654
  if sys.version_info >= (3, 14):
1521
- def __replace__(self, *, value: expr = ..., **kwargs: Unpack[_Attributes[int]]) -> Self: ...
1655
+ def __replace__(self, *, value: expr = ..., **kwargs: Unpack[_Attributes[int]]) -> Self:
1656
+ """Return a copy of the AST node with new values for the specified fields."""
1657
+ ...
1522
1658
 
1523
1659
  class MatchSingleton(pattern):
1524
1660
  __match_args__ = ("value",)
@@ -1526,7 +1662,9 @@ if sys.version_info >= (3, 10):
1526
1662
  def __init__(self, value: bool | None, **kwargs: Unpack[_Attributes[int]]) -> None: ...
1527
1663
 
1528
1664
  if sys.version_info >= (3, 14):
1529
- def __replace__(self, *, value: bool | None = ..., **kwargs: Unpack[_Attributes[int]]) -> Self: ...
1665
+ def __replace__(self, *, value: bool | None = ..., **kwargs: Unpack[_Attributes[int]]) -> Self:
1666
+ """Return a copy of the AST node with new values for the specified fields."""
1667
+ ...
1530
1668
 
1531
1669
  class MatchSequence(pattern):
1532
1670
  __match_args__ = ("patterns",)
@@ -1537,7 +1675,9 @@ if sys.version_info >= (3, 10):
1537
1675
  def __init__(self, patterns: list[pattern], **kwargs: Unpack[_Attributes[int]]) -> None: ...
1538
1676
 
1539
1677
  if sys.version_info >= (3, 14):
1540
- def __replace__(self, *, patterns: list[pattern] = ..., **kwargs: Unpack[_Attributes[int]]) -> Self: ...
1678
+ def __replace__(self, *, patterns: list[pattern] = ..., **kwargs: Unpack[_Attributes[int]]) -> Self:
1679
+ """Return a copy of the AST node with new values for the specified fields."""
1680
+ ...
1541
1681
 
1542
1682
  class MatchMapping(pattern):
1543
1683
  __match_args__ = ("keys", "patterns", "rest")
@@ -1565,7 +1705,9 @@ if sys.version_info >= (3, 10):
1565
1705
  patterns: list[pattern] = ...,
1566
1706
  rest: str | None = ...,
1567
1707
  **kwargs: Unpack[_Attributes[int]],
1568
- ) -> Self: ...
1708
+ ) -> Self:
1709
+ """Return a copy of the AST node with new values for the specified fields."""
1710
+ ...
1569
1711
 
1570
1712
  class MatchClass(pattern):
1571
1713
  __match_args__ = ("cls", "patterns", "kwd_attrs", "kwd_patterns")
@@ -1601,7 +1743,9 @@ if sys.version_info >= (3, 10):
1601
1743
  kwd_attrs: list[str] = ...,
1602
1744
  kwd_patterns: list[pattern] = ...,
1603
1745
  **kwargs: Unpack[_Attributes[int]],
1604
- ) -> Self: ...
1746
+ ) -> Self:
1747
+ """Return a copy of the AST node with new values for the specified fields."""
1748
+ ...
1605
1749
 
1606
1750
  class MatchStar(pattern):
1607
1751
  __match_args__ = ("name",)
@@ -1609,7 +1753,9 @@ if sys.version_info >= (3, 10):
1609
1753
  def __init__(self, name: str | None = None, **kwargs: Unpack[_Attributes[int]]) -> None: ...
1610
1754
 
1611
1755
  if sys.version_info >= (3, 14):
1612
- def __replace__(self, *, name: str | None = ..., **kwargs: Unpack[_Attributes[int]]) -> Self: ...
1756
+ def __replace__(self, *, name: str | None = ..., **kwargs: Unpack[_Attributes[int]]) -> Self:
1757
+ """Return a copy of the AST node with new values for the specified fields."""
1758
+ ...
1613
1759
 
1614
1760
  class MatchAs(pattern):
1615
1761
  __match_args__ = ("pattern", "name")
@@ -1622,7 +1768,9 @@ if sys.version_info >= (3, 10):
1622
1768
  if sys.version_info >= (3, 14):
1623
1769
  def __replace__(
1624
1770
  self, *, pattern: ast.pattern | None = ..., name: str | None = ..., **kwargs: Unpack[_Attributes[int]]
1625
- ) -> Self: ...
1771
+ ) -> Self:
1772
+ """Return a copy of the AST node with new values for the specified fields."""
1773
+ ...
1626
1774
 
1627
1775
  class MatchOr(pattern):
1628
1776
  __match_args__ = ("patterns",)
@@ -1633,7 +1781,9 @@ if sys.version_info >= (3, 10):
1633
1781
  def __init__(self, patterns: list[pattern], **kwargs: Unpack[_Attributes[int]]) -> None: ...
1634
1782
 
1635
1783
  if sys.version_info >= (3, 14):
1636
- def __replace__(self, *, patterns: list[pattern] = ..., **kwargs: Unpack[_Attributes[int]]) -> Self: ...
1784
+ def __replace__(self, *, patterns: list[pattern] = ..., **kwargs: Unpack[_Attributes[int]]) -> Self:
1785
+ """Return a copy of the AST node with new values for the specified fields."""
1786
+ ...
1637
1787
 
1638
1788
  class type_ignore(AST): ...
1639
1789
 
@@ -1645,7 +1795,9 @@ class TypeIgnore(type_ignore):
1645
1795
  def __init__(self, lineno: int, tag: str) -> None: ...
1646
1796
 
1647
1797
  if sys.version_info >= (3, 14):
1648
- def __replace__(self, *, lineno: int = ..., tag: str = ...) -> Self: ...
1798
+ def __replace__(self, *, lineno: int = ..., tag: str = ...) -> Self:
1799
+ """Return a copy of the AST node with new values for the specified fields."""
1800
+ ...
1649
1801
 
1650
1802
  if sys.version_info >= (3, 12):
1651
1803
  class type_param(AST):
@@ -1656,7 +1808,9 @@ if sys.version_info >= (3, 12):
1656
1808
  def __init__(self, **kwargs: Unpack[_Attributes[int]]) -> None: ...
1657
1809
 
1658
1810
  if sys.version_info >= (3, 14):
1659
- def __replace__(self, **kwargs: Unpack[_Attributes[int]]) -> Self: ...
1811
+ def __replace__(self, **kwargs: Unpack[_Attributes[int]]) -> Self:
1812
+ """Return a copy of the AST node with new values for the specified fields."""
1813
+ ...
1660
1814
 
1661
1815
  class TypeVar(type_param):
1662
1816
  if sys.version_info >= (3, 13):
@@ -1681,7 +1835,9 @@ if sys.version_info >= (3, 12):
1681
1835
  bound: expr | None = ...,
1682
1836
  default_value: expr | None = ...,
1683
1837
  **kwargs: Unpack[_Attributes[int]],
1684
- ) -> Self: ...
1838
+ ) -> Self:
1839
+ """Return a copy of the AST node with new values for the specified fields."""
1840
+ ...
1685
1841
 
1686
1842
  class ParamSpec(type_param):
1687
1843
  if sys.version_info >= (3, 13):
@@ -1698,7 +1854,9 @@ if sys.version_info >= (3, 12):
1698
1854
  if sys.version_info >= (3, 14):
1699
1855
  def __replace__(
1700
1856
  self, *, name: str = ..., default_value: expr | None = ..., **kwargs: Unpack[_Attributes[int]]
1701
- ) -> Self: ...
1857
+ ) -> Self:
1858
+ """Return a copy of the AST node with new values for the specified fields."""
1859
+ ...
1702
1860
 
1703
1861
  class TypeVarTuple(type_param):
1704
1862
  if sys.version_info >= (3, 13):
@@ -1715,7 +1873,9 @@ if sys.version_info >= (3, 12):
1715
1873
  if sys.version_info >= (3, 14):
1716
1874
  def __replace__(
1717
1875
  self, *, name: str = ..., default_value: expr | None = ..., **kwargs: Unpack[_Attributes[int]]
1718
- ) -> Self: ...
1876
+ ) -> Self:
1877
+ """Return a copy of the AST node with new values for the specified fields."""
1878
+ ...
1719
1879
 
1720
1880
  if sys.version_info >= (3, 14):
1721
1881
  @type_check_only