basedpyright 1.13.1 → 1.13.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 (148) hide show
  1. package/dist/pyright-langserver.js +1 -1
  2. package/dist/pyright-langserver.js.map +1 -1
  3. package/dist/pyright.js +1 -1
  4. package/dist/pyright.js.map +1 -1
  5. package/dist/typeshed-fallback/commit.txt +1 -1
  6. package/dist/typeshed-fallback/stdlib/VERSIONS +3 -1
  7. package/dist/typeshed-fallback/stdlib/_ast.pyi +1 -1
  8. package/dist/typeshed-fallback/stdlib/_bisect.pyi +221 -221
  9. package/dist/typeshed-fallback/stdlib/_csv.pyi +213 -213
  10. package/dist/typeshed-fallback/stdlib/_curses.pyi +1 -2
  11. package/dist/typeshed-fallback/stdlib/_heapq.pyi +67 -67
  12. package/dist/typeshed-fallback/stdlib/_interpchannels.pyi +84 -0
  13. package/dist/typeshed-fallback/stdlib/_json.pyi +92 -92
  14. package/dist/typeshed-fallback/stdlib/_lsprof.pyi +92 -92
  15. package/dist/typeshed-fallback/stdlib/_random.pyi +30 -30
  16. package/dist/typeshed-fallback/stdlib/_tkinter.pyi +7 -0
  17. package/dist/typeshed-fallback/stdlib/_weakref.pyi +3 -2
  18. package/dist/typeshed-fallback/stdlib/argparse.pyi +6 -2
  19. package/dist/typeshed-fallback/stdlib/array.pyi +281 -281
  20. package/dist/typeshed-fallback/stdlib/asyncio/events.pyi +56 -37
  21. package/dist/typeshed-fallback/stdlib/asyncio/tasks.pyi +4 -1
  22. package/dist/typeshed-fallback/stdlib/asyncio/unix_events.pyi +156 -134
  23. package/dist/typeshed-fallback/stdlib/asyncio/windows_events.pyi +3 -2
  24. package/dist/typeshed-fallback/stdlib/audioop.pyi +95 -95
  25. package/dist/typeshed-fallback/stdlib/binascii.pyi +123 -123
  26. package/dist/typeshed-fallback/stdlib/cmath.pyi +112 -112
  27. package/dist/typeshed-fallback/stdlib/dataclasses.pyi +1 -1
  28. package/dist/typeshed-fallback/stdlib/logging/__init__.pyi +2 -5
  29. package/dist/typeshed-fallback/stdlib/math.pyi +424 -424
  30. package/dist/typeshed-fallback/stdlib/mmap.pyi +160 -154
  31. package/dist/typeshed-fallback/stdlib/multiprocessing/context.pyi +10 -6
  32. package/dist/typeshed-fallback/stdlib/multiprocessing/sharedctypes.pyi +33 -12
  33. package/dist/typeshed-fallback/stdlib/os/__init__.pyi +10 -10
  34. package/dist/typeshed-fallback/stdlib/posixpath.pyi +3 -13
  35. package/dist/typeshed-fallback/stdlib/spwd.pyi +9 -0
  36. package/dist/typeshed-fallback/stdlib/subprocess.pyi +8 -0
  37. package/dist/typeshed-fallback/stdlib/tarfile.pyi +23 -1
  38. package/dist/typeshed-fallback/stdlib/telnetlib.pyi +1 -0
  39. package/dist/typeshed-fallback/stdlib/typing.pyi +21 -2
  40. package/dist/typeshed-fallback/stdlib/weakref.pyi +4 -1
  41. package/dist/typeshed-fallback/stdlib/xml/sax/handler.pyi +1 -1
  42. package/dist/typeshed-fallback/stdlib/zlib.pyi +157 -157
  43. package/dist/typeshed-fallback/stubs/Flask-SocketIO/flask_socketio/__init__.pyi +4 -4
  44. package/dist/typeshed-fallback/stubs/aiofiles/METADATA.toml +1 -1
  45. package/dist/typeshed-fallback/stubs/aiofiles/aiofiles/base.pyi +6 -20
  46. package/dist/typeshed-fallback/stubs/aiofiles/aiofiles/os.pyi +2 -0
  47. package/dist/typeshed-fallback/stubs/aiofiles/aiofiles/ospath.pyi +5 -3
  48. package/dist/typeshed-fallback/stubs/aiofiles/aiofiles/tempfile/__init__.pyi +143 -79
  49. package/dist/typeshed-fallback/stubs/aiofiles/aiofiles/threadpool/__init__.pyi +5 -5
  50. package/dist/typeshed-fallback/stubs/assertpy/assertpy/extracting.pyi +7 -1
  51. package/dist/typeshed-fallback/stubs/docker/docker/_types.pyi +8 -0
  52. package/dist/typeshed-fallback/stubs/docker/docker/api/container.pyi +2 -2
  53. package/dist/typeshed-fallback/stubs/docker/docker/api/image.pyi +3 -2
  54. package/dist/typeshed-fallback/stubs/docker/docker/api/network.pyi +32 -15
  55. package/dist/typeshed-fallback/stubs/docker/docker/models/containers.pyi +36 -7
  56. package/dist/typeshed-fallback/stubs/docker/docker/models/images.pyi +67 -5
  57. package/dist/typeshed-fallback/stubs/docker/docker/models/networks.pyi +20 -3
  58. package/dist/typeshed-fallback/stubs/docker/docker/types/containers.pyi +78 -70
  59. package/dist/typeshed-fallback/stubs/docker/docker/utils/json_stream.pyi +4 -7
  60. package/dist/typeshed-fallback/stubs/flake8/METADATA.toml +1 -1
  61. package/dist/typeshed-fallback/stubs/fpdf2/fpdf/fpdf.pyi +16 -5
  62. package/dist/typeshed-fallback/stubs/fpdf2/fpdf/image_datastructures.pyi +2 -1
  63. package/dist/typeshed-fallback/stubs/fpdf2/fpdf/table.pyi +4 -2
  64. package/dist/typeshed-fallback/stubs/fpdf2/fpdf/text_region.pyi +7 -7
  65. package/dist/typeshed-fallback/stubs/hdbcli/METADATA.toml +1 -1
  66. package/dist/typeshed-fallback/stubs/hdbcli/hdbcli/dbapi.pyi +1 -0
  67. package/dist/typeshed-fallback/stubs/hvac/METADATA.toml +1 -1
  68. package/dist/typeshed-fallback/stubs/hvac/hvac/api/system_backend/raft.pyi +9 -0
  69. package/dist/typeshed-fallback/stubs/hvac/hvac/api/system_backend/wrapping.pyi +1 -0
  70. package/dist/typeshed-fallback/stubs/influxdb-client/METADATA.toml +1 -1
  71. package/dist/typeshed-fallback/stubs/influxdb-client/influxdb_client/client/_pages.pyi +37 -0
  72. package/dist/typeshed-fallback/stubs/influxdb-client/influxdb_client/client/bucket_api.pyi +5 -1
  73. package/dist/typeshed-fallback/stubs/influxdb-client/influxdb_client/client/tasks_api.pyi +4 -3
  74. package/dist/typeshed-fallback/stubs/influxdb-client/influxdb_client/domain/bucket.pyi +6 -6
  75. package/dist/typeshed-fallback/stubs/influxdb-client/influxdb_client/domain/task.pyi +6 -6
  76. package/dist/typeshed-fallback/stubs/networkx/METADATA.toml +3 -1
  77. package/dist/typeshed-fallback/stubs/olefile/olefile/olefile.pyi +41 -31
  78. package/dist/typeshed-fallback/stubs/openpyxl/METADATA.toml +1 -1
  79. package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/cell/rich_text.pyi +3 -0
  80. package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/chart/trendline.pyi +1 -2
  81. package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/descriptors/base.pyi +1 -1
  82. package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/descriptors/container.pyi +18 -0
  83. package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/descriptors/sequence.pyi +20 -12
  84. package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/packaging/custom.pyi +1 -1
  85. package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/packaging/extended.pyi +2 -2
  86. package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/packaging/relationship.pyi +6 -11
  87. package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/pivot/cache.pyi +66 -135
  88. package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/pivot/fields.pyi +2 -2
  89. package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/styles/alignment.pyi +0 -1
  90. package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/styles/borders.pyi +0 -2
  91. package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/styles/fills.pyi +3 -3
  92. package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/styles/named_styles.pyi +5 -10
  93. package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/utils/cell.pyi +2 -2
  94. package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/utils/indexed_list.pyi +2 -2
  95. package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/workbook/defined_name.pyi +2 -2
  96. package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/worksheet/_read_only.pyi +11 -3
  97. package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/worksheet/datavalidation.pyi +2 -2
  98. package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/worksheet/dimensions.pyi +6 -3
  99. package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/worksheet/filters.pyi +26 -22
  100. package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/worksheet/hyperlink.pyi +3 -5
  101. package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/worksheet/views.pyi +5 -2
  102. package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/worksheet/worksheet.pyi +4 -2
  103. package/dist/typeshed-fallback/stubs/peewee/METADATA.toml +1 -1
  104. package/dist/typeshed-fallback/stubs/peewee/peewee.pyi +6 -1
  105. package/dist/typeshed-fallback/stubs/protobuf/METADATA.toml +2 -2
  106. package/dist/typeshed-fallback/stubs/protobuf/google/protobuf/descriptor_pb2.pyi +84 -15
  107. package/dist/typeshed-fallback/stubs/psutil/METADATA.toml +1 -1
  108. package/dist/typeshed-fallback/stubs/psutil/psutil/__init__.pyi +3 -1
  109. package/dist/typeshed-fallback/stubs/psutil/psutil/_common.pyi +0 -2
  110. package/dist/typeshed-fallback/stubs/psutil/psutil/_compat.pyi +0 -1
  111. package/dist/typeshed-fallback/stubs/psutil/psutil/_psaix.pyi +1 -1
  112. package/dist/typeshed-fallback/stubs/psutil/psutil/_psbsd.pyi +1 -1
  113. package/dist/typeshed-fallback/stubs/psutil/psutil/_pslinux.pyi +2 -2
  114. package/dist/typeshed-fallback/stubs/psutil/psutil/_psosx.pyi +1 -1
  115. package/dist/typeshed-fallback/stubs/psutil/psutil/_pssunos.pyi +1 -1
  116. package/dist/typeshed-fallback/stubs/psutil/psutil/_psutil_osx.pyi +1 -1
  117. package/dist/typeshed-fallback/stubs/psutil/psutil/_pswindows.pyi +1 -1
  118. package/dist/typeshed-fallback/stubs/pyinstaller/METADATA.toml +1 -1
  119. package/dist/typeshed-fallback/stubs/pyinstaller/PyInstaller/__main__.pyi +1 -0
  120. package/dist/typeshed-fallback/stubs/pyinstaller/PyInstaller/building/splash.pyi +0 -2
  121. package/dist/typeshed-fallback/stubs/pyinstaller/PyInstaller/compat.pyi +2 -3
  122. package/dist/typeshed-fallback/stubs/reportlab/METADATA.toml +3 -2
  123. package/dist/typeshed-fallback/stubs/requests/requests/models.pyi +2 -2
  124. package/dist/typeshed-fallback/stubs/seaborn/METADATA.toml +2 -1
  125. package/dist/typeshed-fallback/stubs/setuptools/METADATA.toml +1 -1
  126. package/dist/typeshed-fallback/stubs/setuptools/pkg_resources/__init__.pyi +80 -50
  127. package/dist/typeshed-fallback/stubs/setuptools/setuptools/__init__.pyi +2 -4
  128. package/dist/typeshed-fallback/stubs/setuptools/setuptools/build_meta.pyi +6 -3
  129. package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/bdist_egg.pyi +3 -9
  130. package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/bdist_wheel.pyi +61 -0
  131. package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/build_ext.pyi +2 -2
  132. package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/build_py.pyi +12 -1
  133. package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/easy_install.pyi +1 -1
  134. package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/egg_info.pyi +4 -4
  135. package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/install_lib.pyi +3 -4
  136. package/dist/typeshed-fallback/stubs/setuptools/setuptools/compat/py311.pyi +1 -1
  137. package/dist/typeshed-fallback/stubs/setuptools/setuptools/config/expand.pyi +0 -1
  138. package/dist/typeshed-fallback/stubs/shapely/METADATA.toml +2 -1
  139. package/dist/typeshed-fallback/stubs/shapely/shapely/_geometry.pyi +3 -3
  140. package/dist/typeshed-fallback/stubs/shapely/shapely/constructive.pyi +6 -6
  141. package/dist/typeshed-fallback/stubs/shapely/shapely/geometry/base.pyi +3 -3
  142. package/dist/typeshed-fallback/stubs/shapely/shapely/io.pyi +2 -2
  143. package/dist/typeshed-fallback/stubs/shapely/shapely/strtree.pyi +9 -9
  144. package/dist/typeshed-fallback/stubs/tree-sitter-languages/METADATA.toml +1 -1
  145. package/package.json +1 -1
  146. package/dist/typeshed-fallback/stubs/tree-sitter/METADATA.toml +0 -7
  147. package/dist/typeshed-fallback/stubs/tree-sitter/tree_sitter/__init__.pyi +0 -17
  148. package/dist/typeshed-fallback/stubs/tree-sitter/tree_sitter/binding.pyi +0 -115
@@ -1,95 +1,95 @@
1
- from typing_extensions import Buffer, TypeAlias
2
-
3
- _AdpcmState: TypeAlias = tuple[int, int]
4
- _RatecvState: TypeAlias = tuple[int, tuple[tuple[int, int], ...]]
5
-
6
- class error(Exception): ...
7
-
8
- def add(fragment1: Buffer, fragment2: Buffer, width: int, /) -> bytes:
9
- """Return a fragment which is the addition of the two samples passed as parameters."""
10
- ...
11
- def adpcm2lin(fragment: Buffer, width: int, state: _AdpcmState | None, /) -> tuple[bytes, _AdpcmState]:
12
- """Decode an Intel/DVI ADPCM coded fragment to a linear fragment."""
13
- ...
14
- def alaw2lin(fragment: Buffer, width: int, /) -> bytes:
15
- """Convert sound fragments in a-LAW encoding to linearly encoded sound fragments."""
16
- ...
17
- def avg(fragment: Buffer, width: int, /) -> int:
18
- """Return the average over all samples in the fragment."""
19
- ...
20
- def avgpp(fragment: Buffer, width: int, /) -> int:
21
- """Return the average peak-peak value over all samples in the fragment."""
22
- ...
23
- def bias(fragment: Buffer, width: int, bias: int, /) -> bytes:
24
- """Return a fragment that is the original fragment with a bias added to each sample."""
25
- ...
26
- def byteswap(fragment: Buffer, width: int, /) -> bytes:
27
- """Convert big-endian samples to little-endian and vice versa."""
28
- ...
29
- def cross(fragment: Buffer, width: int, /) -> int:
30
- """Return the number of zero crossings in the fragment passed as an argument."""
31
- ...
32
- def findfactor(fragment: Buffer, reference: Buffer, /) -> float:
33
- """Return a factor F such that rms(add(fragment, mul(reference, -F))) is minimal."""
34
- ...
35
- def findfit(fragment: Buffer, reference: Buffer, /) -> tuple[int, float]:
36
- """Try to match reference as well as possible to a portion of fragment."""
37
- ...
38
- def findmax(fragment: Buffer, length: int, /) -> int:
39
- """Search fragment for a slice of specified number of samples with maximum energy."""
40
- ...
41
- def getsample(fragment: Buffer, width: int, index: int, /) -> int:
42
- """Return the value of sample index from the fragment."""
43
- ...
44
- def lin2adpcm(fragment: Buffer, width: int, state: _AdpcmState | None, /) -> tuple[bytes, _AdpcmState]:
45
- """Convert samples to 4 bit Intel/DVI ADPCM encoding."""
46
- ...
47
- def lin2alaw(fragment: Buffer, width: int, /) -> bytes:
48
- """Convert samples in the audio fragment to a-LAW encoding."""
49
- ...
50
- def lin2lin(fragment: Buffer, width: int, newwidth: int, /) -> bytes:
51
- """Convert samples between 1-, 2-, 3- and 4-byte formats."""
52
- ...
53
- def lin2ulaw(fragment: Buffer, width: int, /) -> bytes:
54
- """Convert samples in the audio fragment to u-LAW encoding."""
55
- ...
56
- def max(fragment: Buffer, width: int, /) -> int:
57
- """Return the maximum of the absolute value of all samples in a fragment."""
58
- ...
59
- def maxpp(fragment: Buffer, width: int, /) -> int:
60
- """Return the maximum peak-peak value in the sound fragment."""
61
- ...
62
- def minmax(fragment: Buffer, width: int, /) -> tuple[int, int]:
63
- """Return the minimum and maximum values of all samples in the sound fragment."""
64
- ...
65
- def mul(fragment: Buffer, width: int, factor: float, /) -> bytes:
66
- """Return a fragment that has all samples in the original fragment multiplied by the floating-point value factor."""
67
- ...
68
- def ratecv(
69
- fragment: Buffer,
70
- width: int,
71
- nchannels: int,
72
- inrate: int,
73
- outrate: int,
74
- state: _RatecvState | None,
75
- weightA: int = 1,
76
- weightB: int = 0,
77
- /,
78
- ) -> tuple[bytes, _RatecvState]:
79
- """Convert the frame rate of the input fragment."""
80
- ...
81
- def reverse(fragment: Buffer, width: int, /) -> bytes:
82
- """Reverse the samples in a fragment and returns the modified fragment."""
83
- ...
84
- def rms(fragment: Buffer, width: int, /) -> int:
85
- """Return the root-mean-square of the fragment, i.e. sqrt(sum(S_i^2)/n)."""
86
- ...
87
- def tomono(fragment: Buffer, width: int, lfactor: float, rfactor: float, /) -> bytes:
88
- """Convert a stereo fragment to a mono fragment."""
89
- ...
90
- def tostereo(fragment: Buffer, width: int, lfactor: float, rfactor: float, /) -> bytes:
91
- """Generate a stereo fragment from a mono fragment."""
92
- ...
93
- def ulaw2lin(fragment: Buffer, width: int, /) -> bytes:
94
- """Convert sound fragments in u-LAW encoding to linearly encoded sound fragments."""
95
- ...
1
+ from typing_extensions import Buffer, TypeAlias
2
+
3
+ _AdpcmState: TypeAlias = tuple[int, int]
4
+ _RatecvState: TypeAlias = tuple[int, tuple[tuple[int, int], ...]]
5
+
6
+ class error(Exception): ...
7
+
8
+ def add(fragment1: Buffer, fragment2: Buffer, width: int, /) -> bytes:
9
+ """Return a fragment which is the addition of the two samples passed as parameters."""
10
+ ...
11
+ def adpcm2lin(fragment: Buffer, width: int, state: _AdpcmState | None, /) -> tuple[bytes, _AdpcmState]:
12
+ """Decode an Intel/DVI ADPCM coded fragment to a linear fragment."""
13
+ ...
14
+ def alaw2lin(fragment: Buffer, width: int, /) -> bytes:
15
+ """Convert sound fragments in a-LAW encoding to linearly encoded sound fragments."""
16
+ ...
17
+ def avg(fragment: Buffer, width: int, /) -> int:
18
+ """Return the average over all samples in the fragment."""
19
+ ...
20
+ def avgpp(fragment: Buffer, width: int, /) -> int:
21
+ """Return the average peak-peak value over all samples in the fragment."""
22
+ ...
23
+ def bias(fragment: Buffer, width: int, bias: int, /) -> bytes:
24
+ """Return a fragment that is the original fragment with a bias added to each sample."""
25
+ ...
26
+ def byteswap(fragment: Buffer, width: int, /) -> bytes:
27
+ """Convert big-endian samples to little-endian and vice versa."""
28
+ ...
29
+ def cross(fragment: Buffer, width: int, /) -> int:
30
+ """Return the number of zero crossings in the fragment passed as an argument."""
31
+ ...
32
+ def findfactor(fragment: Buffer, reference: Buffer, /) -> float:
33
+ """Return a factor F such that rms(add(fragment, mul(reference, -F))) is minimal."""
34
+ ...
35
+ def findfit(fragment: Buffer, reference: Buffer, /) -> tuple[int, float]:
36
+ """Try to match reference as well as possible to a portion of fragment."""
37
+ ...
38
+ def findmax(fragment: Buffer, length: int, /) -> int:
39
+ """Search fragment for a slice of specified number of samples with maximum energy."""
40
+ ...
41
+ def getsample(fragment: Buffer, width: int, index: int, /) -> int:
42
+ """Return the value of sample index from the fragment."""
43
+ ...
44
+ def lin2adpcm(fragment: Buffer, width: int, state: _AdpcmState | None, /) -> tuple[bytes, _AdpcmState]:
45
+ """Convert samples to 4 bit Intel/DVI ADPCM encoding."""
46
+ ...
47
+ def lin2alaw(fragment: Buffer, width: int, /) -> bytes:
48
+ """Convert samples in the audio fragment to a-LAW encoding."""
49
+ ...
50
+ def lin2lin(fragment: Buffer, width: int, newwidth: int, /) -> bytes:
51
+ """Convert samples between 1-, 2-, 3- and 4-byte formats."""
52
+ ...
53
+ def lin2ulaw(fragment: Buffer, width: int, /) -> bytes:
54
+ """Convert samples in the audio fragment to u-LAW encoding."""
55
+ ...
56
+ def max(fragment: Buffer, width: int, /) -> int:
57
+ """Return the maximum of the absolute value of all samples in a fragment."""
58
+ ...
59
+ def maxpp(fragment: Buffer, width: int, /) -> int:
60
+ """Return the maximum peak-peak value in the sound fragment."""
61
+ ...
62
+ def minmax(fragment: Buffer, width: int, /) -> tuple[int, int]:
63
+ """Return the minimum and maximum values of all samples in the sound fragment."""
64
+ ...
65
+ def mul(fragment: Buffer, width: int, factor: float, /) -> bytes:
66
+ """Return a fragment that has all samples in the original fragment multiplied by the floating-point value factor."""
67
+ ...
68
+ def ratecv(
69
+ fragment: Buffer,
70
+ width: int,
71
+ nchannels: int,
72
+ inrate: int,
73
+ outrate: int,
74
+ state: _RatecvState | None,
75
+ weightA: int = 1,
76
+ weightB: int = 0,
77
+ /,
78
+ ) -> tuple[bytes, _RatecvState]:
79
+ """Convert the frame rate of the input fragment."""
80
+ ...
81
+ def reverse(fragment: Buffer, width: int, /) -> bytes:
82
+ """Reverse the samples in a fragment and returns the modified fragment."""
83
+ ...
84
+ def rms(fragment: Buffer, width: int, /) -> int:
85
+ """Return the root-mean-square of the fragment, i.e. sqrt(sum(S_i^2)/n)."""
86
+ ...
87
+ def tomono(fragment: Buffer, width: int, lfactor: float, rfactor: float, /) -> bytes:
88
+ """Convert a stereo fragment to a mono fragment."""
89
+ ...
90
+ def tostereo(fragment: Buffer, width: int, lfactor: float, rfactor: float, /) -> bytes:
91
+ """Generate a stereo fragment from a mono fragment."""
92
+ ...
93
+ def ulaw2lin(fragment: Buffer, width: int, /) -> bytes:
94
+ """Convert sound fragments in u-LAW encoding to linearly encoded sound fragments."""
95
+ ...
@@ -1,123 +1,123 @@
1
- """Conversion between binary data and ASCII"""
2
-
3
- import sys
4
- from _typeshed import ReadableBuffer
5
- from typing_extensions import TypeAlias
6
-
7
- # Many functions in binascii accept buffer objects
8
- # or ASCII-only strings.
9
- _AsciiBuffer: TypeAlias = str | ReadableBuffer
10
-
11
- def a2b_uu(data: _AsciiBuffer, /) -> bytes:
12
- """Decode a line of uuencoded data."""
13
- ...
14
- def b2a_uu(data: ReadableBuffer, /, *, backtick: bool = False) -> bytes:
15
- """Uuencode line of data."""
16
- ...
17
-
18
- if sys.version_info >= (3, 11):
19
- def a2b_base64(data: _AsciiBuffer, /, *, strict_mode: bool = False) -> bytes:
20
- """
21
- Decode a line of base64 data.
22
-
23
- strict_mode
24
- When set to True, bytes that are not part of the base64 standard are not allowed.
25
- The same applies to excess data after padding (= / ==).
26
- """
27
- ...
28
-
29
- else:
30
- def a2b_base64(data: _AsciiBuffer, /) -> bytes:
31
- """Decode a line of base64 data."""
32
- ...
33
-
34
- def b2a_base64(data: ReadableBuffer, /, *, newline: bool = True) -> bytes:
35
- """Base64-code line of data."""
36
- ...
37
- def a2b_qp(data: _AsciiBuffer, header: bool = False) -> bytes:
38
- """Decode a string of qp-encoded data."""
39
- ...
40
- def b2a_qp(data: ReadableBuffer, quotetabs: bool = False, istext: bool = True, header: bool = False) -> bytes:
41
- r"""
42
- Encode a string using quoted-printable encoding.
43
-
44
- On encoding, when istext is set, newlines are not encoded, and white
45
- space at end of lines is. When istext is not set, \r and \n (CR/LF)
46
- are both encoded. When quotetabs is set, space and tabs are encoded.
47
- """
48
- ...
49
-
50
- if sys.version_info < (3, 11):
51
- def a2b_hqx(data: _AsciiBuffer, /) -> bytes:
52
- """Decode .hqx coding."""
53
- ...
54
- def rledecode_hqx(data: ReadableBuffer, /) -> bytes:
55
- """Decode hexbin RLE-coded string."""
56
- ...
57
- def rlecode_hqx(data: ReadableBuffer, /) -> bytes:
58
- """Binhex RLE-code binary data."""
59
- ...
60
- def b2a_hqx(data: ReadableBuffer, /) -> bytes:
61
- """Encode .hqx data."""
62
- ...
63
-
64
- def crc_hqx(data: ReadableBuffer, crc: int, /) -> int:
65
- """Compute CRC-CCITT incrementally."""
66
- ...
67
- def crc32(data: ReadableBuffer, crc: int = 0, /) -> int:
68
- """Compute CRC-32 incrementally."""
69
- ...
70
- def b2a_hex(data: ReadableBuffer, sep: str | bytes = ..., bytes_per_sep: int = ...) -> bytes:
71
- r"""
72
- Hexadecimal representation of binary data.
73
-
74
- sep
75
- An optional single character or byte to separate hex bytes.
76
- bytes_per_sep
77
- How many bytes between separators. Positive values count from the
78
- right, negative values count from the left.
79
-
80
- The return value is a bytes object. This function is also
81
- available as "hexlify()".
82
-
83
- Example:
84
- >>> binascii.b2a_hex(b'\xb9\x01\xef')
85
- b'b901ef'
86
- >>> binascii.hexlify(b'\xb9\x01\xef', ':')
87
- b'b9:01:ef'
88
- >>> binascii.b2a_hex(b'\xb9\x01\xef', b'_', 2)
89
- b'b9_01ef'
90
- """
91
- ...
92
- def hexlify(data: ReadableBuffer, sep: str | bytes = ..., bytes_per_sep: int = ...) -> bytes:
93
- """
94
- Hexadecimal representation of binary data.
95
-
96
- sep
97
- An optional single character or byte to separate hex bytes.
98
- bytes_per_sep
99
- How many bytes between separators. Positive values count from the
100
- right, negative values count from the left.
101
-
102
- The return value is a bytes object. This function is also
103
- available as "b2a_hex()".
104
- """
105
- ...
106
- def a2b_hex(hexstr: _AsciiBuffer, /) -> bytes:
107
- """
108
- Binary data of hexadecimal representation.
109
-
110
- hexstr must contain an even number of hex digits (upper or lower case).
111
- This function is also available as "unhexlify()".
112
- """
113
- ...
114
- def unhexlify(hexstr: _AsciiBuffer, /) -> bytes:
115
- """
116
- Binary data of hexadecimal representation.
117
-
118
- hexstr must contain an even number of hex digits (upper or lower case).
119
- """
120
- ...
121
-
122
- class Error(ValueError): ...
123
- class Incomplete(Exception): ...
1
+ """Conversion between binary data and ASCII"""
2
+
3
+ import sys
4
+ from _typeshed import ReadableBuffer
5
+ from typing_extensions import TypeAlias
6
+
7
+ # Many functions in binascii accept buffer objects
8
+ # or ASCII-only strings.
9
+ _AsciiBuffer: TypeAlias = str | ReadableBuffer
10
+
11
+ def a2b_uu(data: _AsciiBuffer, /) -> bytes:
12
+ """Decode a line of uuencoded data."""
13
+ ...
14
+ def b2a_uu(data: ReadableBuffer, /, *, backtick: bool = False) -> bytes:
15
+ """Uuencode line of data."""
16
+ ...
17
+
18
+ if sys.version_info >= (3, 11):
19
+ def a2b_base64(data: _AsciiBuffer, /, *, strict_mode: bool = False) -> bytes:
20
+ """
21
+ Decode a line of base64 data.
22
+
23
+ strict_mode
24
+ When set to True, bytes that are not part of the base64 standard are not allowed.
25
+ The same applies to excess data after padding (= / ==).
26
+ """
27
+ ...
28
+
29
+ else:
30
+ def a2b_base64(data: _AsciiBuffer, /) -> bytes:
31
+ """Decode a line of base64 data."""
32
+ ...
33
+
34
+ def b2a_base64(data: ReadableBuffer, /, *, newline: bool = True) -> bytes:
35
+ """Base64-code line of data."""
36
+ ...
37
+ def a2b_qp(data: _AsciiBuffer, header: bool = False) -> bytes:
38
+ """Decode a string of qp-encoded data."""
39
+ ...
40
+ def b2a_qp(data: ReadableBuffer, quotetabs: bool = False, istext: bool = True, header: bool = False) -> bytes:
41
+ r"""
42
+ Encode a string using quoted-printable encoding.
43
+
44
+ On encoding, when istext is set, newlines are not encoded, and white
45
+ space at end of lines is. When istext is not set, \r and \n (CR/LF)
46
+ are both encoded. When quotetabs is set, space and tabs are encoded.
47
+ """
48
+ ...
49
+
50
+ if sys.version_info < (3, 11):
51
+ def a2b_hqx(data: _AsciiBuffer, /) -> bytes:
52
+ """Decode .hqx coding."""
53
+ ...
54
+ def rledecode_hqx(data: ReadableBuffer, /) -> bytes:
55
+ """Decode hexbin RLE-coded string."""
56
+ ...
57
+ def rlecode_hqx(data: ReadableBuffer, /) -> bytes:
58
+ """Binhex RLE-code binary data."""
59
+ ...
60
+ def b2a_hqx(data: ReadableBuffer, /) -> bytes:
61
+ """Encode .hqx data."""
62
+ ...
63
+
64
+ def crc_hqx(data: ReadableBuffer, crc: int, /) -> int:
65
+ """Compute CRC-CCITT incrementally."""
66
+ ...
67
+ def crc32(data: ReadableBuffer, crc: int = 0, /) -> int:
68
+ """Compute CRC-32 incrementally."""
69
+ ...
70
+ def b2a_hex(data: ReadableBuffer, sep: str | bytes = ..., bytes_per_sep: int = ...) -> bytes:
71
+ r"""
72
+ Hexadecimal representation of binary data.
73
+
74
+ sep
75
+ An optional single character or byte to separate hex bytes.
76
+ bytes_per_sep
77
+ How many bytes between separators. Positive values count from the
78
+ right, negative values count from the left.
79
+
80
+ The return value is a bytes object. This function is also
81
+ available as "hexlify()".
82
+
83
+ Example:
84
+ >>> binascii.b2a_hex(b'\xb9\x01\xef')
85
+ b'b901ef'
86
+ >>> binascii.hexlify(b'\xb9\x01\xef', ':')
87
+ b'b9:01:ef'
88
+ >>> binascii.b2a_hex(b'\xb9\x01\xef', b'_', 2)
89
+ b'b9_01ef'
90
+ """
91
+ ...
92
+ def hexlify(data: ReadableBuffer, sep: str | bytes = ..., bytes_per_sep: int = ...) -> bytes:
93
+ """
94
+ Hexadecimal representation of binary data.
95
+
96
+ sep
97
+ An optional single character or byte to separate hex bytes.
98
+ bytes_per_sep
99
+ How many bytes between separators. Positive values count from the
100
+ right, negative values count from the left.
101
+
102
+ The return value is a bytes object. This function is also
103
+ available as "b2a_hex()".
104
+ """
105
+ ...
106
+ def a2b_hex(hexstr: _AsciiBuffer, /) -> bytes:
107
+ """
108
+ Binary data of hexadecimal representation.
109
+
110
+ hexstr must contain an even number of hex digits (upper or lower case).
111
+ This function is also available as "unhexlify()".
112
+ """
113
+ ...
114
+ def unhexlify(hexstr: _AsciiBuffer, /) -> bytes:
115
+ """
116
+ Binary data of hexadecimal representation.
117
+
118
+ hexstr must contain an even number of hex digits (upper or lower case).
119
+ """
120
+ ...
121
+
122
+ class Error(ValueError): ...
123
+ class Incomplete(Exception): ...
@@ -1,112 +1,112 @@
1
- """
2
- This module provides access to mathematical functions for complex
3
- numbers.
4
- """
5
-
6
- from typing import SupportsComplex, SupportsFloat, SupportsIndex
7
- from typing_extensions import TypeAlias
8
-
9
- e: float
10
- pi: float
11
- inf: float
12
- infj: complex
13
- nan: float
14
- nanj: complex
15
- tau: float
16
-
17
- _C: TypeAlias = SupportsFloat | SupportsComplex | SupportsIndex | complex
18
-
19
- def acos(z: _C, /) -> complex:
20
- """Return the arc cosine of z."""
21
- ...
22
- def acosh(z: _C, /) -> complex:
23
- """Return the inverse hyperbolic cosine of z."""
24
- ...
25
- def asin(z: _C, /) -> complex:
26
- """Return the arc sine of z."""
27
- ...
28
- def asinh(z: _C, /) -> complex:
29
- """Return the inverse hyperbolic sine of z."""
30
- ...
31
- def atan(z: _C, /) -> complex:
32
- """Return the arc tangent of z."""
33
- ...
34
- def atanh(z: _C, /) -> complex:
35
- """Return the inverse hyperbolic tangent of z."""
36
- ...
37
- def cos(z: _C, /) -> complex:
38
- """Return the cosine of z."""
39
- ...
40
- def cosh(z: _C, /) -> complex:
41
- """Return the hyperbolic cosine of z."""
42
- ...
43
- def exp(z: _C, /) -> complex:
44
- """Return the exponential value e**z."""
45
- ...
46
- def isclose(a: _C, b: _C, *, rel_tol: SupportsFloat = 1e-09, abs_tol: SupportsFloat = 0.0) -> bool:
47
- """
48
- Determine whether two complex numbers are close in value.
49
-
50
- rel_tol
51
- maximum difference for being considered "close", relative to the
52
- magnitude of the input values
53
- abs_tol
54
- maximum difference for being considered "close", regardless of the
55
- magnitude of the input values
56
-
57
- Return True if a is close in value to b, and False otherwise.
58
-
59
- For the values to be considered close, the difference between them must be
60
- smaller than at least one of the tolerances.
61
-
62
- -inf, inf and NaN behave similarly to the IEEE 754 Standard. That is, NaN is
63
- not close to anything, even itself. inf and -inf are only close to themselves.
64
- """
65
- ...
66
- def isinf(z: _C, /) -> bool:
67
- """Checks if the real or imaginary part of z is infinite."""
68
- ...
69
- def isnan(z: _C, /) -> bool:
70
- """Checks if the real or imaginary part of z not a number (NaN)."""
71
- ...
72
- def log(x: _C, base: _C = ..., /) -> complex:
73
- """
74
- log(z[, base]) -> the logarithm of z to the given base.
75
-
76
- If the base not specified, returns the natural logarithm (base e) of z.
77
- """
78
- ...
79
- def log10(z: _C, /) -> complex:
80
- """Return the base-10 logarithm of z."""
81
- ...
82
- def phase(z: _C, /) -> float:
83
- """Return argument, also known as the phase angle, of a complex."""
84
- ...
85
- def polar(z: _C, /) -> tuple[float, float]:
86
- """
87
- Convert a complex from rectangular coordinates to polar coordinates.
88
-
89
- r is the distance from 0 and phi the phase angle.
90
- """
91
- ...
92
- def rect(r: float, phi: float, /) -> complex:
93
- """Convert from polar coordinates to rectangular coordinates."""
94
- ...
95
- def sin(z: _C, /) -> complex:
96
- """Return the sine of z."""
97
- ...
98
- def sinh(z: _C, /) -> complex:
99
- """Return the hyperbolic sine of z."""
100
- ...
101
- def sqrt(z: _C, /) -> complex:
102
- """Return the square root of z."""
103
- ...
104
- def tan(z: _C, /) -> complex:
105
- """Return the tangent of z."""
106
- ...
107
- def tanh(z: _C, /) -> complex:
108
- """Return the hyperbolic tangent of z."""
109
- ...
110
- def isfinite(z: _C, /) -> bool:
111
- """Return True if both the real and imaginary parts of z are finite, else False."""
112
- ...
1
+ """
2
+ This module provides access to mathematical functions for complex
3
+ numbers.
4
+ """
5
+
6
+ from typing import SupportsComplex, SupportsFloat, SupportsIndex
7
+ from typing_extensions import TypeAlias
8
+
9
+ e: float
10
+ pi: float
11
+ inf: float
12
+ infj: complex
13
+ nan: float
14
+ nanj: complex
15
+ tau: float
16
+
17
+ _C: TypeAlias = SupportsFloat | SupportsComplex | SupportsIndex | complex
18
+
19
+ def acos(z: _C, /) -> complex:
20
+ """Return the arc cosine of z."""
21
+ ...
22
+ def acosh(z: _C, /) -> complex:
23
+ """Return the inverse hyperbolic cosine of z."""
24
+ ...
25
+ def asin(z: _C, /) -> complex:
26
+ """Return the arc sine of z."""
27
+ ...
28
+ def asinh(z: _C, /) -> complex:
29
+ """Return the inverse hyperbolic sine of z."""
30
+ ...
31
+ def atan(z: _C, /) -> complex:
32
+ """Return the arc tangent of z."""
33
+ ...
34
+ def atanh(z: _C, /) -> complex:
35
+ """Return the inverse hyperbolic tangent of z."""
36
+ ...
37
+ def cos(z: _C, /) -> complex:
38
+ """Return the cosine of z."""
39
+ ...
40
+ def cosh(z: _C, /) -> complex:
41
+ """Return the hyperbolic cosine of z."""
42
+ ...
43
+ def exp(z: _C, /) -> complex:
44
+ """Return the exponential value e**z."""
45
+ ...
46
+ def isclose(a: _C, b: _C, *, rel_tol: SupportsFloat = 1e-09, abs_tol: SupportsFloat = 0.0) -> bool:
47
+ """
48
+ Determine whether two complex numbers are close in value.
49
+
50
+ rel_tol
51
+ maximum difference for being considered "close", relative to the
52
+ magnitude of the input values
53
+ abs_tol
54
+ maximum difference for being considered "close", regardless of the
55
+ magnitude of the input values
56
+
57
+ Return True if a is close in value to b, and False otherwise.
58
+
59
+ For the values to be considered close, the difference between them must be
60
+ smaller than at least one of the tolerances.
61
+
62
+ -inf, inf and NaN behave similarly to the IEEE 754 Standard. That is, NaN is
63
+ not close to anything, even itself. inf and -inf are only close to themselves.
64
+ """
65
+ ...
66
+ def isinf(z: _C, /) -> bool:
67
+ """Checks if the real or imaginary part of z is infinite."""
68
+ ...
69
+ def isnan(z: _C, /) -> bool:
70
+ """Checks if the real or imaginary part of z not a number (NaN)."""
71
+ ...
72
+ def log(x: _C, base: _C = ..., /) -> complex:
73
+ """
74
+ log(z[, base]) -> the logarithm of z to the given base.
75
+
76
+ If the base not specified, returns the natural logarithm (base e) of z.
77
+ """
78
+ ...
79
+ def log10(z: _C, /) -> complex:
80
+ """Return the base-10 logarithm of z."""
81
+ ...
82
+ def phase(z: _C, /) -> float:
83
+ """Return argument, also known as the phase angle, of a complex."""
84
+ ...
85
+ def polar(z: _C, /) -> tuple[float, float]:
86
+ """
87
+ Convert a complex from rectangular coordinates to polar coordinates.
88
+
89
+ r is the distance from 0 and phi the phase angle.
90
+ """
91
+ ...
92
+ def rect(r: float, phi: float, /) -> complex:
93
+ """Convert from polar coordinates to rectangular coordinates."""
94
+ ...
95
+ def sin(z: _C, /) -> complex:
96
+ """Return the sine of z."""
97
+ ...
98
+ def sinh(z: _C, /) -> complex:
99
+ """Return the hyperbolic sine of z."""
100
+ ...
101
+ def sqrt(z: _C, /) -> complex:
102
+ """Return the square root of z."""
103
+ ...
104
+ def tan(z: _C, /) -> complex:
105
+ """Return the tangent of z."""
106
+ ...
107
+ def tanh(z: _C, /) -> complex:
108
+ """Return the hyperbolic tangent of z."""
109
+ ...
110
+ def isfinite(z: _C, /) -> bool:
111
+ """Return True if both the real and imaginary parts of z are finite, else False."""
112
+ ...