basedpyright 1.40.1 → 1.40.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/dist/pyright-langserver.js +1 -1
  2. package/dist/pyright.js +1 -1
  3. package/dist/typeshed-fallback/stdlib/_blake2.pyi +1 -1
  4. package/dist/typeshed-fallback/stdlib/_curses.pyi +81 -54
  5. package/dist/typeshed-fallback/stdlib/_curses_panel.pyi +8 -1
  6. package/dist/typeshed-fallback/stdlib/_decimal.pyi +9 -6
  7. package/dist/typeshed-fallback/stdlib/_interpqueues.pyi +24 -36
  8. package/dist/typeshed-fallback/stdlib/_interpreters.pyi +26 -71
  9. package/dist/typeshed-fallback/stdlib/_json.pyi +15 -11
  10. package/dist/typeshed-fallback/stdlib/_remote_debugging.pyi +355 -72
  11. package/dist/typeshed-fallback/stdlib/_socket.pyi +21 -21
  12. package/dist/typeshed-fallback/stdlib/_sqlite3.pyi +0 -15
  13. package/dist/typeshed-fallback/stdlib/_struct.pyi +39 -42
  14. package/dist/typeshed-fallback/stdlib/_thread.pyi +18 -14
  15. package/dist/typeshed-fallback/stdlib/array.pyi +8 -4
  16. package/dist/typeshed-fallback/stdlib/ast.pyi +9 -3
  17. package/dist/typeshed-fallback/stdlib/binascii.pyi +113 -10
  18. package/dist/typeshed-fallback/stdlib/builtins.pyi +260 -43
  19. package/dist/typeshed-fallback/stdlib/collections/__init__.pyi +12 -4
  20. package/dist/typeshed-fallback/stdlib/dataclasses.pyi +3 -1
  21. package/dist/typeshed-fallback/stdlib/datetime.pyi +93 -25
  22. package/dist/typeshed-fallback/stdlib/decimal.pyi +272 -208
  23. package/dist/typeshed-fallback/stdlib/faulthandler.pyi +29 -4
  24. package/dist/typeshed-fallback/stdlib/fcntl.pyi +6 -12
  25. package/dist/typeshed-fallback/stdlib/importlib/metadata/__init__.pyi +2 -0
  26. package/dist/typeshed-fallback/stdlib/json/encoder.pyi +2 -10
  27. package/dist/typeshed-fallback/stdlib/marshal.pyi +33 -2
  28. package/dist/typeshed-fallback/stdlib/math/__init__.pyi +15 -7
  29. package/dist/typeshed-fallback/stdlib/math/integer.pyi +43 -8
  30. package/dist/typeshed-fallback/stdlib/mmap.pyi +1 -1
  31. package/dist/typeshed-fallback/stdlib/os/__init__.pyi +60 -4
  32. package/dist/typeshed-fallback/stdlib/posixpath.pyi +14 -2
  33. package/dist/typeshed-fallback/stdlib/profiling/__init__.pyi +3 -3
  34. package/dist/typeshed-fallback/stdlib/profiling/sampling/__init__.pyi +17 -17
  35. package/dist/typeshed-fallback/stdlib/profiling/sampling/collector.pyi +25 -25
  36. package/dist/typeshed-fallback/stdlib/profiling/sampling/gecko_collector.pyi +111 -111
  37. package/dist/typeshed-fallback/stdlib/profiling/sampling/heatmap_collector.pyi +24 -24
  38. package/dist/typeshed-fallback/stdlib/profiling/sampling/jsonl_collector.pyi +15 -15
  39. package/dist/typeshed-fallback/stdlib/profiling/sampling/pstats_collector.pyi +17 -17
  40. package/dist/typeshed-fallback/stdlib/profiling/sampling/stack_collector.pyi +39 -39
  41. package/dist/typeshed-fallback/stdlib/profiling/sampling/string_table.pyi +5 -5
  42. package/dist/typeshed-fallback/stdlib/profiling/tracing.pyi +9 -9
  43. package/dist/typeshed-fallback/stdlib/pyexpat/__init__.pyi +24 -18
  44. package/dist/typeshed-fallback/stdlib/re.pyi +18 -3
  45. package/dist/typeshed-fallback/stdlib/select.pyi +2 -2
  46. package/dist/typeshed-fallback/stdlib/signal.pyi +1 -1
  47. package/dist/typeshed-fallback/stdlib/sqlite3/__init__.pyi +28 -5
  48. package/dist/typeshed-fallback/stdlib/sys/__init__.pyi +42 -4
  49. package/dist/typeshed-fallback/stdlib/types.pyi +44 -14
  50. package/dist/typeshed-fallback/stdlib/unicodedata.pyi +27 -9
  51. package/dist/typeshed-fallback/stdlib/urllib/parse.pyi +132 -6
  52. package/dist/typeshed-fallback/stdlib/winreg.pyi +5 -0
  53. package/dist/typeshed-fallback/stdlib/xml/utils.pyi +2 -2
  54. package/dist/typeshed-fallback/stdlib/zlib.pyi +34 -2
  55. package/package.json +1 -1
@@ -1434,8 +1434,8 @@ class str(Sequence[str]):
1434
1434
  Maximum number of occurrences to replace.
1435
1435
  -1 (the default value) means replace all occurrences.
1436
1436
 
1437
- If the optional argument count is given, only the first count occurrences are
1438
- replaced.
1437
+ If count is given, only the first count occurrences are replaced.
1438
+ If count is not specified or -1, then all occurrences are replaced.
1439
1439
  """
1440
1440
  ...
1441
1441
  @overload
@@ -1447,8 +1447,8 @@ class str(Sequence[str]):
1447
1447
  Maximum number of occurrences to replace.
1448
1448
  -1 (the default value) means replace all occurrences.
1449
1449
 
1450
- If the optional argument count is given, only the first count occurrences are
1451
- replaced.
1450
+ If count is given, only the first count occurrences are replaced.
1451
+ If count is not specified or -1, then all occurrences are replaced.
1452
1452
  """
1453
1453
  ...
1454
1454
  else:
@@ -1820,7 +1820,20 @@ class str(Sequence[str]):
1820
1820
  | frozendict[str | int, _T]
1821
1821
  ),
1822
1822
  /,
1823
- ) -> dict[int, _T]: ...
1823
+ ) -> dict[int, _T]:
1824
+ """
1825
+ Return a translation table usable for str.translate().
1826
+
1827
+ If there is only one argument, it must be a dictionary mapping
1828
+ Unicode ordinals (integers) or characters to Unicode ordinals,
1829
+ strings or None. Character keys will be then converted to ordinals.
1830
+ If there are two arguments, they must be strings of equal length,
1831
+ and in the resulting dictionary, each character in x will be mapped
1832
+ to the character at the same position in y. If there is a third
1833
+ argument, it must be a string, whose characters will be mapped to
1834
+ None in the result.
1835
+ """
1836
+ ...
1824
1837
  else:
1825
1838
  @staticmethod
1826
1839
  @overload
@@ -2212,7 +2225,18 @@ class bytes(Sequence[int]):
2212
2225
  """
2213
2226
  ...
2214
2227
  if sys.version_info >= (3, 15):
2215
- def replace(self, old: ReadableBuffer, new: ReadableBuffer, /, count: SupportsIndex = -1) -> bytes: ...
2228
+ def replace(self, old: ReadableBuffer, new: ReadableBuffer, /, count: SupportsIndex = -1) -> bytes:
2229
+ """
2230
+ Return a copy with all occurrences of substring old replaced by new.
2231
+
2232
+ count
2233
+ Maximum number of occurrences to replace.
2234
+ -1 (the default value) means replace all occurrences.
2235
+
2236
+ If count is given, only the first count occurrences are replaced.
2237
+ If count is not specified or -1, then all occurrences are replaced.
2238
+ """
2239
+ ...
2216
2240
  else:
2217
2241
  def replace(self, old: ReadableBuffer, new: ReadableBuffer, count: SupportsIndex = -1, /) -> bytes:
2218
2242
  """
@@ -2817,7 +2841,18 @@ class bytearray(MutableSequence[int]):
2817
2841
  """
2818
2842
  ...
2819
2843
  if sys.version_info >= (3, 15):
2820
- def replace(self, old: ReadableBuffer, new: ReadableBuffer, /, count: SupportsIndex = -1) -> bytearray: ...
2844
+ def replace(self, old: ReadableBuffer, new: ReadableBuffer, /, count: SupportsIndex = -1) -> bytearray:
2845
+ """
2846
+ Return a copy with all occurrences of substring old replaced by new.
2847
+
2848
+ count
2849
+ Maximum number of occurrences to replace.
2850
+ -1 (the default value) means replace all occurrences.
2851
+
2852
+ If count is given, only the first count occurrences are replaced.
2853
+ If count is not specified or -1, then all occurrences are replaced.
2854
+ """
2855
+ ...
2821
2856
  else:
2822
2857
  def replace(self, old: ReadableBuffer, new: ReadableBuffer, count: SupportsIndex = -1, /) -> bytearray:
2823
2858
  """
@@ -2980,7 +3015,14 @@ class bytearray(MutableSequence[int]):
2980
3015
  """
2981
3016
  ...
2982
3017
  if sys.version_info >= (3, 15):
2983
- def take_bytes(self, n: int | None = None, /) -> bytes: ...
3018
+ def take_bytes(self, n: int | None = None, /) -> bytes:
3019
+ """
3020
+ Take *n* bytes from the bytearray and return them as a bytes object.
3021
+
3022
+ n
3023
+ Bytes to take, negative indexes from end. None indicates all bytes.
3024
+ """
3025
+ ...
2984
3026
 
2985
3027
  def upper(self) -> bytearray:
2986
3028
  """
@@ -3460,7 +3502,9 @@ class slice(Generic[_StartT_co, _StopT_co, _StepT_co]):
3460
3502
  """
3461
3503
  ...
3462
3504
  if sys.version_info >= (3, 15):
3463
- def __class_getitem__(cls, item: Any, /) -> GenericAlias: ...
3505
+ def __class_getitem__(cls, item: Any, /) -> GenericAlias:
3506
+ """slices are generic over the types of their start, end, and step values"""
3507
+ ...
3464
3508
 
3465
3509
  @disjoint_base
3466
3510
  class tuple(Sequence[_T_co]):
@@ -3902,12 +3946,18 @@ class dict(MutableMapping[_KT, _VT]):
3902
3946
  """dicts are generic over two types, signifying (respectively) the types of their keys and values"""
3903
3947
  ...
3904
3948
  if sys.version_info >= (3, 15):
3905
- def __or__(self, value: dict[_T1, _T2] | frozendict[_T1, _T2], /) -> dict[_KT | _T1, _VT | _T2]: ...
3949
+ def __or__(self, value: dict[_T1, _T2] | frozendict[_T1, _T2], /) -> dict[_KT | _T1, _VT | _T2]:
3950
+ """Return self|value."""
3951
+ ...
3906
3952
 
3907
3953
  @overload
3908
- def __ror__(self, value: dict[_T1, _T2], /) -> dict[_KT | _T1, _VT | _T2]: ...
3954
+ def __ror__(self, value: dict[_T1, _T2], /) -> dict[_KT | _T1, _VT | _T2]:
3955
+ """Return value|self."""
3956
+ ...
3909
3957
  @overload
3910
- def __ror__(self, value: frozendict[_T1, _T2], /) -> frozendict[_KT | _T1, _VT | _T2]: ...
3958
+ def __ror__(self, value: frozendict[_T1, _T2], /) -> frozendict[_KT | _T1, _VT | _T2]:
3959
+ """Return value|self."""
3960
+ ...
3911
3961
  else:
3912
3962
  def __or__(self, value: dict[_T1, _T2], /) -> dict[_KT | _T1, _VT | _T2]:
3913
3963
  """Return self|value."""
@@ -3929,6 +3979,18 @@ class dict(MutableMapping[_KT, _VT]):
3929
3979
  if sys.version_info >= (3, 15):
3930
3980
  @disjoint_base
3931
3981
  class frozendict(Mapping[_KT, _VT]):
3982
+ """
3983
+ frozendict() -> new empty immutable dictionary
3984
+ frozendict(mapping) -> new immutable dictionary initialized from a mapping
3985
+ object's (key, value) pairs
3986
+ frozendict(iterable) -> new immutable dictionary initialized as if via:
3987
+ d = {}
3988
+ for k, v in iterable:
3989
+ d[k] = v
3990
+ d = frozendict(d)
3991
+ frozendict(**kwargs) -> new immutable dictionary initialized with the name=value
3992
+ pairs in the keyword argument list. For example: frozendict(one=1, two=2)
3993
+ """
3932
3994
  @overload
3933
3995
  def __new__(cls, /) -> frozendict[Any, Any]: ...
3934
3996
  @overload
@@ -3947,37 +4009,73 @@ if sys.version_info >= (3, 15):
3947
4009
  ) -> frozendict[str, _VT]: ...
3948
4010
 
3949
4011
  def __init__(self) -> None: ...
3950
- def copy(self) -> frozendict[_KT, _VT]: ...
4012
+ def copy(self) -> frozendict[_KT, _VT]:
4013
+ """Return a shallow copy of the frozendict."""
4014
+ ...
3951
4015
 
3952
4016
  @overload
3953
4017
  @classmethod
3954
- def fromkeys(cls, iterable: Iterable[_T], value: None = None, /) -> frozendict[_T, Any | None]: ...
4018
+ def fromkeys(cls, iterable: Iterable[_T], value: None = None, /) -> frozendict[_T, Any | None]:
4019
+ """Create a new dictionary with keys from iterable and values set to value."""
4020
+ ...
3955
4021
  @overload
3956
4022
  @classmethod
3957
- def fromkeys(cls, iterable: Iterable[_T], value: _S, /) -> frozendict[_T, _S]: ...
4023
+ def fromkeys(cls, iterable: Iterable[_T], value: _S, /) -> frozendict[_T, _S]:
4024
+ """Create a new dictionary with keys from iterable and values set to value."""
4025
+ ...
3958
4026
 
3959
4027
  @overload # type: ignore[override]
3960
- def get(self, key: _KT, default: None = None, /) -> _VT | None: ...
4028
+ def get(self, key: _KT, default: None = None, /) -> _VT | None:
4029
+ """Return the value for key if key is in the dictionary, else default."""
4030
+ ...
3961
4031
  @overload
3962
- def get(self, key: _KT, default: _VT, /) -> _VT: ...
4032
+ def get(self, key: _KT, default: _VT, /) -> _VT:
4033
+ """Return the value for key if key is in the dictionary, else default."""
4034
+ ...
3963
4035
  @overload
3964
- def get(self, key: _KT, default: _T, /) -> _VT | _T: ...
3965
-
3966
- def keys(self) -> dict_keys[_KT, _VT]: ...
3967
- def values(self) -> dict_values[_KT, _VT]: ...
3968
- def items(self) -> dict_items[_KT, _VT]: ...
3969
- def __len__(self) -> int: ...
3970
- def __getitem__(self, key: _KT, /) -> _VT: ...
3971
- def __reversed__(self) -> Iterator[_KT]: ...
3972
- def __iter__(self) -> Iterator[_KT]: ...
3973
- def __hash__(self) -> int: ...
3974
- def __class_getitem__(cls, item: Any, /) -> GenericAlias: ...
3975
- def __or__(self, value: dict[_T1, _T2] | frozendict[_T1, _T2], /) -> frozendict[_KT | _T1, _VT | _T2]: ...
4036
+ def get(self, key: _KT, default: _T, /) -> _VT | _T:
4037
+ """Return the value for key if key is in the dictionary, else default."""
4038
+ ...
4039
+
4040
+ def keys(self) -> dict_keys[_KT, _VT]:
4041
+ """Return a set-like object providing a view on the dict's keys."""
4042
+ ...
4043
+ def values(self) -> dict_values[_KT, _VT]:
4044
+ """Return an object providing a view on the dict's values."""
4045
+ ...
4046
+ def items(self) -> dict_items[_KT, _VT]:
4047
+ """Return a set-like object providing a view on the dict's items."""
4048
+ ...
4049
+ def __len__(self) -> int:
4050
+ """Return len(self)."""
4051
+ ...
4052
+ def __getitem__(self, key: _KT, /) -> _VT:
4053
+ """Return self[key]."""
4054
+ ...
4055
+ def __reversed__(self) -> Iterator[_KT]:
4056
+ """Return a reverse iterator over the dict keys."""
4057
+ ...
4058
+ def __iter__(self) -> Iterator[_KT]:
4059
+ """Implement iter(self)."""
4060
+ ...
4061
+ def __hash__(self) -> int:
4062
+ """Return hash(self)."""
4063
+ ...
4064
+ def __class_getitem__(cls, item: Any, /) -> GenericAlias:
4065
+ """frozendicts are generic over two types, signifying (respectively) the types of the frozendict's keys and values"""
4066
+ ...
4067
+ def __or__(self, value: dict[_T1, _T2] | frozendict[_T1, _T2], /) -> frozendict[_KT | _T1, _VT | _T2]:
4068
+ """Return self|value."""
4069
+ ...
3976
4070
 
3977
4071
  @overload
3978
- def __ror__(self, value: dict[_T1, _T2], /) -> dict[_KT | _T1, _VT | _T2]: ...
4072
+ def __ror__(self, value: dict[_T1, _T2], /) -> dict[_KT | _T1, _VT | _T2]:
4073
+ """Return value|self."""
4074
+ ...
3979
4075
  @overload
3980
- def __ror__(self, value: frozendict[_T1, _T2], /) -> frozendict[_KT | _T1, _VT | _T2]: ...
4076
+ def __ror__(self, value: frozendict[_T1, _T2], /) -> frozendict[_KT | _T1, _VT | _T2]:
4077
+ """Return value|self."""
4078
+ ...
3981
4079
 
3982
4080
  @disjoint_base
3983
4081
  class set(MutableSet[_T]):
@@ -4365,7 +4463,14 @@ def ascii(obj: object, /) -> str:
4365
4463
  ...
4366
4464
 
4367
4465
  if sys.version_info >= (3, 15):
4368
- def bin(integer: SupportsIndex, /) -> str: ...
4466
+ def bin(integer: SupportsIndex, /) -> str:
4467
+ """
4468
+ Return the binary representation of an integer.
4469
+
4470
+ >>> bin(2796202)
4471
+ '0b1010101010101010101010'
4472
+ """
4473
+ ...
4369
4474
 
4370
4475
  else:
4371
4476
  def bin(number: SupportsIndex, /) -> str:
@@ -4441,7 +4546,23 @@ if sys.version_info >= (3, 15):
4441
4546
  *,
4442
4547
  module: str | None = None,
4443
4548
  _feature_version: int = -1,
4444
- ) -> CodeType: ...
4549
+ ) -> CodeType:
4550
+ """
4551
+ Compile source into a code object that can be executed by exec() or eval().
4552
+
4553
+ The source code may represent a Python module, statement or
4554
+ expression.
4555
+ The filename will be used for run-time error messages.
4556
+ The mode must be 'exec' to compile a module, 'single' to compile a
4557
+ single (interactive) statement, or 'eval' to compile an expression.
4558
+ The flags argument, if present, controls which future statements
4559
+ influence the compilation of the code.
4560
+ The dont_inherit argument, if true, stops the compilation inheriting
4561
+ the effects of any future statements in effect in the code calling
4562
+ compile; if absent or false these statements do influence the
4563
+ compilation, in addition to any features explicitly specified.
4564
+ """
4565
+ ...
4445
4566
  @overload
4446
4567
  def compile(
4447
4568
  source: str | ReadableBuffer | _ast.Module | _ast.Expression | _ast.Interactive,
@@ -4452,7 +4573,23 @@ if sys.version_info >= (3, 15):
4452
4573
  optimize: int = -1,
4453
4574
  module: str | None = None,
4454
4575
  _feature_version: int = -1,
4455
- ) -> CodeType: ...
4576
+ ) -> CodeType:
4577
+ """
4578
+ Compile source into a code object that can be executed by exec() or eval().
4579
+
4580
+ The source code may represent a Python module, statement or
4581
+ expression.
4582
+ The filename will be used for run-time error messages.
4583
+ The mode must be 'exec' to compile a module, 'single' to compile a
4584
+ single (interactive) statement, or 'eval' to compile an expression.
4585
+ The flags argument, if present, controls which future statements
4586
+ influence the compilation of the code.
4587
+ The dont_inherit argument, if true, stops the compilation inheriting
4588
+ the effects of any future statements in effect in the code calling
4589
+ compile; if absent or false these statements do influence the
4590
+ compilation, in addition to any features explicitly specified.
4591
+ """
4592
+ ...
4456
4593
  @overload
4457
4594
  def compile(
4458
4595
  source: str | ReadableBuffer | _ast.Module | _ast.Expression | _ast.Interactive,
@@ -4464,7 +4601,23 @@ if sys.version_info >= (3, 15):
4464
4601
  *,
4465
4602
  module: str | None = None,
4466
4603
  _feature_version: int = -1,
4467
- ) -> _ast.AST: ...
4604
+ ) -> _ast.AST:
4605
+ """
4606
+ Compile source into a code object that can be executed by exec() or eval().
4607
+
4608
+ The source code may represent a Python module, statement or
4609
+ expression.
4610
+ The filename will be used for run-time error messages.
4611
+ The mode must be 'exec' to compile a module, 'single' to compile a
4612
+ single (interactive) statement, or 'eval' to compile an expression.
4613
+ The flags argument, if present, controls which future statements
4614
+ influence the compilation of the code.
4615
+ The dont_inherit argument, if true, stops the compilation inheriting
4616
+ the effects of any future statements in effect in the code calling
4617
+ compile; if absent or false these statements do influence the
4618
+ compilation, in addition to any features explicitly specified.
4619
+ """
4620
+ ...
4468
4621
  @overload
4469
4622
  def compile(
4470
4623
  source: str | ReadableBuffer | _ast.Module | _ast.Expression | _ast.Interactive,
@@ -4476,7 +4629,23 @@ if sys.version_info >= (3, 15):
4476
4629
  *,
4477
4630
  module: str | None = None,
4478
4631
  _feature_version: int = -1,
4479
- ) -> Any: ...
4632
+ ) -> Any:
4633
+ """
4634
+ Compile source into a code object that can be executed by exec() or eval().
4635
+
4636
+ The source code may represent a Python module, statement or
4637
+ expression.
4638
+ The filename will be used for run-time error messages.
4639
+ The mode must be 'exec' to compile a module, 'single' to compile a
4640
+ single (interactive) statement, or 'eval' to compile an expression.
4641
+ The flags argument, if present, controls which future statements
4642
+ influence the compilation of the code.
4643
+ The dont_inherit argument, if true, stops the compilation inheriting
4644
+ the effects of any future statements in effect in the code calling
4645
+ compile; if absent or false these statements do influence the
4646
+ compilation, in addition to any features explicitly specified.
4647
+ """
4648
+ ...
4480
4649
  else:
4481
4650
  @overload
4482
4651
  def compile(
@@ -4630,7 +4799,17 @@ if sys.version_info >= (3, 15):
4630
4799
  /,
4631
4800
  globals: dict[str, Any] | frozendict[str, Any] | None = None,
4632
4801
  locals: Mapping[str, object] | None = None,
4633
- ) -> Any: ...
4802
+ ) -> Any:
4803
+ """
4804
+ Evaluate the given source in the context of globals and locals.
4805
+
4806
+ The source may be a string representing a Python expression
4807
+ or a code object as returned by compile().
4808
+ The globals must be a dictionary and locals can be any mapping,
4809
+ defaulting to the current globals and locals.
4810
+ If only globals is given, locals defaults to it.
4811
+ """
4812
+ ...
4634
4813
 
4635
4814
  elif sys.version_info >= (3, 13):
4636
4815
  def eval(
@@ -4677,7 +4856,19 @@ if sys.version_info >= (3, 15):
4677
4856
  locals: Mapping[str, object] | None = None,
4678
4857
  *,
4679
4858
  closure: tuple[CellType, ...] | None = None,
4680
- ) -> None: ...
4859
+ ) -> None:
4860
+ """
4861
+ Execute the given source in the context of globals and locals.
4862
+
4863
+ The source may be a string representing one or more Python statements
4864
+ or a code object as returned by compile().
4865
+ The globals must be a dictionary and locals can be any mapping,
4866
+ defaulting to the current globals and locals.
4867
+ If only globals is given, locals defaults to it.
4868
+ The closure must be a tuple of cellvars, and can only be used
4869
+ when source is a code object requiring exactly that many cellvars.
4870
+ """
4871
+ ...
4681
4872
 
4682
4873
  elif sys.version_info >= (3, 13):
4683
4874
  def exec(
@@ -4885,7 +5076,14 @@ def hash(obj: object, /) -> int:
4885
5076
  help: _sitebuiltins._Helper
4886
5077
 
4887
5078
  if sys.version_info >= (3, 15):
4888
- def hex(integer: SupportsIndex, /) -> str: ...
5079
+ def hex(integer: SupportsIndex, /) -> str:
5080
+ """
5081
+ Return the hexadecimal representation of an integer.
5082
+
5083
+ >>> hex(12648430)
5084
+ '0xc0ffee'
5085
+ """
5086
+ ...
4889
5087
 
4890
5088
  else:
4891
5089
  def hex(number: SupportsIndex, /) -> str:
@@ -5296,7 +5494,14 @@ def next(i: SupportsNext[_T], default: _VT, /) -> _T | _VT:
5296
5494
  ...
5297
5495
 
5298
5496
  if sys.version_info >= (3, 15):
5299
- def oct(integer: SupportsIndex, /) -> str: ...
5497
+ def oct(integer: SupportsIndex, /) -> str:
5498
+ """
5499
+ Return the octal representation of an integer.
5500
+
5501
+ >>> oct(342391)
5502
+ '0o1234567'
5503
+ """
5504
+ ...
5300
5505
 
5301
5506
  else:
5302
5507
  def oct(number: SupportsIndex, /) -> str:
@@ -6508,13 +6713,18 @@ def setattr(obj: object, name: str, value: Any, /) -> None:
6508
6713
  if sys.version_info >= (3, 15):
6509
6714
  @final
6510
6715
  class sentinel:
6716
+ """Create a unique sentinel object with the given name."""
6511
6717
  __name__: str
6512
6718
  __module__: str
6513
6719
  def __new__(cls, name: str, /, *, repr: str | None = None) -> Self: ...
6514
6720
  def __copy__(self, /) -> Self: ...
6515
6721
  def __deepcopy__(self, memo: Any, /) -> Self: ...
6516
- def __or__(self, other: Any, /) -> Any: ...
6517
- def __ror__(self, other: Any, /) -> Any: ...
6722
+ def __or__(self, other: Any, /) -> Any:
6723
+ """Return self|value."""
6724
+ ...
6725
+ def __ror__(self, other: Any, /) -> Any:
6726
+ """Return value|self."""
6727
+ ...
6518
6728
 
6519
6729
  @overload
6520
6730
  def sorted(
@@ -6698,7 +6908,14 @@ if sys.version_info >= (3, 15):
6698
6908
  locals: Mapping[str, object] | None = None,
6699
6909
  fromlist: Sequence[str] | None = (),
6700
6910
  level: int = 0,
6701
- ) -> Any: ...
6911
+ ) -> Any:
6912
+ """
6913
+ Lazily imports a module.
6914
+
6915
+ Returns either the module to be imported or a imp.lazy_module object
6916
+ which indicates the module to be lazily imported.
6917
+ """
6918
+ ...
6702
6919
 
6703
6920
  def __build_class__(func: Callable[[], CellType | Any], name: str, /, *bases: Any, metaclass: Any = ..., **kwds: Any) -> Any:
6704
6921
  """
@@ -535,16 +535,24 @@ class OrderedDict(dict[_KT, _VT]):
535
535
 
536
536
  if sys.version_info >= (3, 15):
537
537
  @overload
538
- def __or__(self, value: dict[_KT, _VT] | frozendict[_KT, _VT], /) -> Self: ...
538
+ def __or__(self, value: dict[_KT, _VT] | frozendict[_KT, _VT], /) -> Self:
539
+ """Return self|value."""
540
+ ...
539
541
  @overload
540
- def __or__(self, value: dict[_T1, _T2] | frozendict[_T1, _T2], /) -> OrderedDict[_KT | _T1, _VT | _T2]: ...
542
+ def __or__(self, value: dict[_T1, _T2] | frozendict[_T1, _T2], /) -> OrderedDict[_KT | _T1, _VT | _T2]:
543
+ """Return self|value."""
544
+ ...
541
545
 
542
546
  @overload # type: ignore[override]
543
- def __ror__(self, value: dict[_KT, _VT] | frozendict[_KT, _VT], /) -> Self: ... # type: ignore[override,misc]
547
+ def __ror__(self, value: dict[_KT, _VT] | frozendict[_KT, _VT], /) -> Self:
548
+ """Return value|self."""
549
+ ...
544
550
  @overload
545
551
  def __ror__( # type: ignore[misc]
546
552
  self, value: dict[_T1, _T2] | frozendict[_T1, _T2], /
547
- ) -> OrderedDict[_KT | _T1, _VT | _T2]: ...
553
+ ) -> OrderedDict[_KT | _T1, _VT | _T2]:
554
+ """Return value|self."""
555
+ ...
548
556
  else:
549
557
  @overload
550
558
  def __or__(self, value: dict[_KT, _VT], /) -> Self:
@@ -58,7 +58,9 @@ class _MISSING_TYPE(enum.Enum):
58
58
 
59
59
  MISSING: Final = _MISSING_TYPE.MISSING
60
60
 
61
- class KW_ONLY: ...
61
+ class KW_ONLY:
62
+ """Create a unique sentinel object with the given name."""
63
+ ...
62
64
 
63
65
  @overload
64
66
  def asdict(obj: DataclassInstance) -> dict[str, Any]: ...