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
@@ -13,7 +13,14 @@ def disable() -> None:
13
13
  if sys.version_info >= (3, 15):
14
14
  def dump_traceback(
15
15
  file: FileDescriptorLike = sys.stderr, all_threads: bool = True, *, max_threads: int | None = None
16
- ) -> None: ...
16
+ ) -> None:
17
+ """
18
+ Dump the traceback of the current thread into file.
19
+
20
+ Dump the traceback of all threads if all_threads is true. max_threads
21
+ caps the number of threads dumped.
22
+ """
23
+ ...
17
24
 
18
25
  else:
19
26
  def dump_traceback(file: FileDescriptorLike = sys.stderr, all_threads: bool = True) -> None:
@@ -33,7 +40,15 @@ if sys.version_info >= (3, 15):
33
40
  exit: bool = False,
34
41
  *,
35
42
  max_threads: int | None = None,
36
- ) -> None: ...
43
+ ) -> None:
44
+ """
45
+ Dump the traceback of all threads in timeout seconds.
46
+
47
+ If repeat is true, the tracebacks of all threads are dumped every
48
+ timeout seconds. If exit is true, call _exit(1) which is not safe.
49
+ max_threads caps the number of threads dumped.
50
+ """
51
+ ...
37
52
 
38
53
  else:
39
54
  def dump_traceback_later(
@@ -48,7 +63,9 @@ else:
48
63
  if sys.version_info >= (3, 15):
49
64
  def enable(
50
65
  file: FileDescriptorLike = sys.stderr, all_threads: bool = True, c_stack: bool = True, *, max_threads: int | None = None
51
- ) -> None: ...
66
+ ) -> None:
67
+ """Enable the fault handler."""
68
+ ...
52
69
 
53
70
  elif sys.version_info >= (3, 14):
54
71
  def enable(file: FileDescriptorLike = sys.stderr, all_threads: bool = True, c_stack: bool = True) -> None:
@@ -73,7 +90,15 @@ if sys.platform != "win32":
73
90
  chain: bool = False,
74
91
  *,
75
92
  max_threads: int | None = None,
76
- ) -> None: ...
93
+ ) -> None:
94
+ """
95
+ Register a handler for the signal 'signum'.
96
+
97
+ Dump the traceback of the current thread, or of all threads if
98
+ all_threads is True, into file. max_threads caps the number of threads
99
+ dumped.
100
+ """
101
+ ...
77
102
  else:
78
103
  def register(
79
104
  signum: int, file: FileDescriptorLike = sys.stderr, all_threads: bool = True, chain: bool = False
@@ -158,8 +158,7 @@ if sys.platform != "win32":
158
158
 
159
159
  If arg is given as a bytes-like object, the return value of fcntl() is a
160
160
  bytes object of that length, containing the resulting value put in the
161
- arg buffer by the operating system. The length of the arg buffer is not
162
- allowed to exceed 1024 bytes.
161
+ arg buffer by the operating system.
163
162
  """
164
163
  ...
165
164
  @overload
@@ -180,8 +179,7 @@ if sys.platform != "win32":
180
179
 
181
180
  If arg is given as a bytes-like object, the return value of fcntl() is a
182
181
  bytes object of that length, containing the resulting value put in the
183
- arg buffer by the operating system. The length of the arg buffer is not
184
- allowed to exceed 1024 bytes.
182
+ arg buffer by the operating system.
185
183
  """
186
184
  ...
187
185
 
@@ -215,8 +213,7 @@ if sys.platform != "win32":
215
213
  If the argument is an immutable buffer then a copy of the buffer is
216
214
  passed to the operating system and the return value is a bytes object of
217
215
  the same length containing whatever the operating system put in the
218
- buffer. The length of the arg buffer in this case is not allowed to
219
- exceed 1024 bytes.
216
+ buffer.
220
217
  """
221
218
  ...
222
219
  # The return type works as follows:
@@ -253,8 +250,7 @@ if sys.platform != "win32":
253
250
  If the argument is an immutable buffer then a copy of the buffer is
254
251
  passed to the operating system and the return value is a bytes object of
255
252
  the same length containing whatever the operating system put in the
256
- buffer. The length of the arg buffer in this case is not allowed to
257
- exceed 1024 bytes.
253
+ buffer.
258
254
  """
259
255
  ...
260
256
  @overload
@@ -286,8 +282,7 @@ if sys.platform != "win32":
286
282
  If the argument is an immutable buffer then a copy of the buffer is
287
283
  passed to the operating system and the return value is a bytes object of
288
284
  the same length containing whatever the operating system put in the
289
- buffer. The length of the arg buffer in this case is not allowed to
290
- exceed 1024 bytes.
285
+ buffer.
291
286
  """
292
287
  ...
293
288
  @overload
@@ -319,8 +314,7 @@ if sys.platform != "win32":
319
314
  If the argument is an immutable buffer then a copy of the buffer is
320
315
  passed to the operating system and the return value is a bytes object of
321
316
  the same length containing whatever the operating system put in the
322
- buffer. The length of the arg buffer in this case is not allowed to
323
- exceed 1024 bytes.
317
+ buffer.
324
318
  """
325
319
  ...
326
320
 
@@ -272,6 +272,8 @@ class Distribution(_distribution_parent):
272
272
 
273
273
  Custom providers may provide the METADATA file or override this
274
274
  property.
275
+
276
+ :raises MetadataNotFound: If no metadata file is present.
275
277
  """
276
278
  ...
277
279
  @property
@@ -11,18 +11,10 @@ INFINITY: Final[float] # undocumented
11
11
  def py_encode_basestring(s: str) -> str: ... # undocumented
12
12
  def py_encode_basestring_ascii(s: str) -> str: ... # undocumented
13
13
  def encode_basestring(s: str, /) -> str:
14
- """
15
- encode_basestring(string) -> string
16
-
17
- Return a JSON representation of a Python string
18
- """
14
+ """Return a JSON representation of a Python string"""
19
15
  ...
20
16
  def encode_basestring_ascii(s: str, /) -> str:
21
- """
22
- encode_basestring_ascii(string) -> string
23
-
24
- Return an ASCII-only JSON representation of a Python string
25
- """
17
+ """Return an ASCII-only JSON representation of a Python string"""
26
18
  ...
27
19
 
28
20
  class JSONEncoder:
@@ -58,8 +58,39 @@ _Marshallable: TypeAlias = (
58
58
  )
59
59
 
60
60
  if sys.version_info >= (3, 15):
61
- def dump(value: _Marshallable, file: SupportsWrite[bytes], version: int = 6, /, *, allow_code: bool = True) -> None: ...
62
- def dumps(value: _Marshallable, version: int = 6, /, *, allow_code: bool = True) -> bytes: ...
61
+ def dump(value: _Marshallable, file: SupportsWrite[bytes], version: int = 6, /, *, allow_code: bool = True) -> None:
62
+ """
63
+ Write the value on the open file.
64
+
65
+ value
66
+ Must be a supported type.
67
+ file
68
+ Must be a writeable binary file.
69
+ version
70
+ Indicates the data format that dump should use.
71
+ allow_code
72
+ Allow to write code objects.
73
+
74
+ If the value has (or contains an object that has) an unsupported type, a
75
+ ValueError exception is raised - but garbage data will also be written
76
+ to the file. The object will not be properly read back by load().
77
+ """
78
+ ...
79
+ def dumps(value: _Marshallable, version: int = 6, /, *, allow_code: bool = True) -> bytes:
80
+ """
81
+ Return the bytes object that would be written to a file by dump(value, file).
82
+
83
+ value
84
+ Must be a supported type.
85
+ version
86
+ Indicates the data format that dumps should use.
87
+ allow_code
88
+ Allow to write code objects.
89
+
90
+ Raise a ValueError exception if value has (or contains an object that
91
+ has) an unsupported type.
92
+ """
93
+ ...
63
94
 
64
95
  elif sys.version_info >= (3, 14):
65
96
  def dump(value: _Marshallable, file: SupportsWrite[bytes], version: int = 5, /, *, allow_code: bool = True) -> None:
@@ -94,7 +94,6 @@ def comb(n: SupportsIndex, k: SupportsIndex, /) -> int:
94
94
  to the coefficient of k-th term in polynomial expansion of the
95
95
  expression (1 + x)**n.
96
96
 
97
- Raises TypeError if either of the arguments are not integers.
98
97
  Raises ValueError if either of the arguments are negative.
99
98
  """
100
99
  ...
@@ -185,8 +184,12 @@ def fmod(x: _SupportsFloatOrIndex, y: _SupportsFloatOrIndex, /) -> float:
185
184
  ...
186
185
 
187
186
  if sys.version_info >= (3, 15):
188
- def fmax(x: _SupportsFloatOrIndex, y: _SupportsFloatOrIndex, /) -> float: ...
189
- def fmin(x: _SupportsFloatOrIndex, y: _SupportsFloatOrIndex, /) -> float: ...
187
+ def fmax(x: _SupportsFloatOrIndex, y: _SupportsFloatOrIndex, /) -> float:
188
+ """Return the larger of two floating-point arguments."""
189
+ ...
190
+ def fmin(x: _SupportsFloatOrIndex, y: _SupportsFloatOrIndex, /) -> float:
191
+ """Return the smaller of two floating-point arguments."""
192
+ ...
190
193
 
191
194
  def frexp(x: _SupportsFloatOrIndex, /) -> tuple[float, int]:
192
195
  """
@@ -264,8 +267,12 @@ def isnan(x: _SupportsFloatOrIndex, /) -> bool:
264
267
  ...
265
268
 
266
269
  if sys.version_info >= (3, 15):
267
- def isnormal(x: _SupportsFloatOrIndex, /) -> bool: ...
268
- def issubnormal(x: _SupportsFloatOrIndex, /) -> bool: ...
270
+ def isnormal(x: _SupportsFloatOrIndex, /) -> bool:
271
+ """Return True if x is normal, and False otherwise."""
272
+ ...
273
+ def issubnormal(x: _SupportsFloatOrIndex, /) -> bool:
274
+ """Return True if x is subnormal, and False otherwise."""
275
+ ...
269
276
 
270
277
  def isqrt(n: SupportsIndex, /) -> int:
271
278
  """Return the integer part of the square root of the input."""
@@ -339,7 +346,6 @@ def perm(n: SupportsIndex, k: SupportsIndex | None = None, /) -> int:
339
346
  If k is not specified or is None, then k defaults to n
340
347
  and the function returns n!.
341
348
 
342
- Raises TypeError if either of the arguments are not integers.
343
349
  Raises ValueError if either of the arguments are negative.
344
350
  """
345
351
  ...
@@ -418,7 +424,9 @@ def sin(x: _SupportsFloatOrIndex, /) -> float:
418
424
  ...
419
425
 
420
426
  if sys.version_info >= (3, 15):
421
- def signbit(x: _SupportsFloatOrIndex, /) -> bool: ...
427
+ def signbit(x: _SupportsFloatOrIndex, /) -> bool:
428
+ """Return True if the sign of x is negative and False otherwise."""
429
+ ...
422
430
 
423
431
  def sinh(x: _SupportsFloatOrIndex, /) -> float:
424
432
  """Return the hyperbolic sine of x."""
@@ -1,8 +1,43 @@
1
- from typing import SupportsIndex
2
-
3
- def comb(n: SupportsIndex, k: SupportsIndex, /) -> int: ...
4
- def factorial(n: SupportsIndex, /) -> int: ...
5
- def gcd(*integers: SupportsIndex) -> int: ...
6
- def isqrt(n: SupportsIndex, /) -> int: ...
7
- def lcm(*integers: SupportsIndex) -> int: ...
8
- def perm(n: SupportsIndex, k: SupportsIndex | None = None, /) -> int: ...
1
+ """This module provides access to integer related mathematical functions."""
2
+
3
+ from typing import SupportsIndex
4
+
5
+ def comb(n: SupportsIndex, k: SupportsIndex, /) -> int:
6
+ """
7
+ Number of ways to choose k items from n items without repetition and without order.
8
+
9
+ Evaluates to n! / (k! * (n - k)!) when k <= n and evaluates
10
+ to zero when k > n.
11
+
12
+ Also called the binomial coefficient because it is equivalent
13
+ to the coefficient of k-th term in polynomial expansion of the
14
+ expression (1 + x)**n.
15
+
16
+ Raises ValueError if either of the arguments are negative.
17
+ """
18
+ ...
19
+ def factorial(n: SupportsIndex, /) -> int:
20
+ """Find n!."""
21
+ ...
22
+ def gcd(*integers: SupportsIndex) -> int:
23
+ """Greatest Common Divisor."""
24
+ ...
25
+ def isqrt(n: SupportsIndex, /) -> int:
26
+ """Return the integer part of the square root of the input."""
27
+ ...
28
+ def lcm(*integers: SupportsIndex) -> int:
29
+ """Least Common Multiple."""
30
+ ...
31
+ def perm(n: SupportsIndex, k: SupportsIndex | None = None, /) -> int:
32
+ """
33
+ Number of ways to choose k items from n items without repetition and with order.
34
+
35
+ Evaluates to n! / (n - k)! when k <= n and evaluates
36
+ to zero when k > n.
37
+
38
+ If k is not specified or is None, then k defaults to n
39
+ and the function returns n!.
40
+
41
+ Raises ValueError if either of the arguments are negative.
42
+ """
43
+ ...
@@ -37,7 +37,7 @@ PAGESIZE: Final[int]
37
37
  @disjoint_base
38
38
  class mmap:
39
39
  """
40
- Windows: mmap(fileno, length[, tagname[, access[, offset]]])
40
+ Windows: mmap(fileno, length[, tagname[, access[, offset[, trackfd]]]])
41
41
 
42
42
  Maps length bytes from the file specified by the file handle fileno,
43
43
  and returns a mmap object. If length is larger than the current size
@@ -1653,6 +1653,7 @@ if sys.platform != "win32":
1653
1653
 
1654
1654
  - RWF_HIPRI
1655
1655
  - RWF_NOWAIT
1656
+ - RWF_DONTCACHE
1656
1657
 
1657
1658
  Using non-zero flags requires Linux 4.6 or newer.
1658
1659
  """
@@ -1675,6 +1676,8 @@ if sys.platform != "win32":
1675
1676
  - RWF_DSYNC
1676
1677
  - RWF_SYNC
1677
1678
  - RWF_APPEND
1679
+ - RWF_DONTCACHE
1680
+ - RWF_ATOMIC
1678
1681
 
1679
1682
  Using non-zero flags requires Linux 4.7 or newer.
1680
1683
  """
@@ -1829,8 +1832,8 @@ def access(
1829
1832
  NotImplementedError.
1830
1833
 
1831
1834
  Note that most operations will use the effective uid/gid, therefore this
1832
- routine can be used in a suid/sgid environment to test if the invoking user
1833
- has the specified access to the path.
1835
+ routine can be used in a suid/sgid environment to test if the invoking
1836
+ user has the specified access to the path.
1834
1837
  """
1835
1838
  ...
1836
1839
  def chdir(path: FileDescriptorOrPath) -> None:
@@ -2480,6 +2483,7 @@ if sys.platform != "win32":
2480
2483
  Like fork(), return pid of 0 to the child process,
2481
2484
  and pid of child to the parent process.
2482
2485
  To both, return fd of newly opened pseudo-terminal.
2486
+ The master_fd is non-inheritable.
2483
2487
  """
2484
2488
  ...
2485
2489
  def killpg(pgid: int, signal: int, /) -> None:
@@ -2740,7 +2744,33 @@ else:
2740
2744
  setsigmask: Iterable[int] = (),
2741
2745
  setsigdef: Iterable[int] = (),
2742
2746
  scheduler: tuple[Any, sched_param] | None = None, # None allowed starting in 3.15
2743
- ) -> int: ...
2747
+ ) -> int:
2748
+ """
2749
+ Execute the program specified by path in a new process.
2750
+
2751
+ path
2752
+ Path of executable file.
2753
+ argv
2754
+ Tuple or list of strings.
2755
+ env
2756
+ Dictionary of strings mapping to strings.
2757
+ file_actions
2758
+ A sequence of file action tuples.
2759
+ setpgroup
2760
+ The pgroup to use with the POSIX_SPAWN_SETPGROUP flag.
2761
+ resetids
2762
+ If the value is `true` the POSIX_SPAWN_RESETIDS will be activated.
2763
+ setsid
2764
+ If the value is `true` the POSIX_SPAWN_SETSID or POSIX_SPAWN_SETSID_NP
2765
+ will be activated.
2766
+ setsigmask
2767
+ The sigmask to use with the POSIX_SPAWN_SETSIGMASK flag.
2768
+ setsigdef
2769
+ The sigmask to use with the POSIX_SPAWN_SETSIGDEF flag.
2770
+ scheduler
2771
+ A tuple with the scheduler policy (optional) and parameters.
2772
+ """
2773
+ ...
2744
2774
  def posix_spawnp(
2745
2775
  path: StrOrBytesPath,
2746
2776
  argv: _ExecVArgs,
@@ -2754,7 +2784,33 @@ else:
2754
2784
  setsigmask: Iterable[int] = (),
2755
2785
  setsigdef: Iterable[int] = (),
2756
2786
  scheduler: tuple[Any, sched_param] | None = None, # None allowed starting in 3.15
2757
- ) -> int: ...
2787
+ ) -> int:
2788
+ """
2789
+ Execute the program specified by path in a new process.
2790
+
2791
+ path
2792
+ Path of executable file.
2793
+ argv
2794
+ Tuple or list of strings.
2795
+ env
2796
+ Dictionary of strings mapping to strings.
2797
+ file_actions
2798
+ A sequence of file action tuples.
2799
+ setpgroup
2800
+ The pgroup to use with the POSIX_SPAWN_SETPGROUP flag.
2801
+ resetids
2802
+ If the value is `True` the POSIX_SPAWN_RESETIDS will be activated.
2803
+ setsid
2804
+ If the value is `True` the POSIX_SPAWN_SETSID or POSIX_SPAWN_SETSID_NP
2805
+ will be activated.
2806
+ setsigmask
2807
+ The sigmask to use with the POSIX_SPAWN_SETSIGMASK flag.
2808
+ setsigdef
2809
+ The sigmask to use with the POSIX_SPAWN_SETSIGDEF flag.
2810
+ scheduler
2811
+ A tuple with the scheduler policy (optional) and parameters.
2812
+ """
2813
+ ...
2758
2814
  elif sys.version_info >= (3, 13):
2759
2815
  def posix_spawn(
2760
2816
  path: StrOrBytesPath,
@@ -224,9 +224,21 @@ if sys.version_info >= (3, 12):
224
224
 
225
225
  if sys.version_info >= (3, 15):
226
226
  @overload
227
- def splitroot(path: AnyOrLiteralStr, /) -> tuple[AnyOrLiteralStr, AnyOrLiteralStr, AnyOrLiteralStr]: ...
227
+ def splitroot(path: AnyOrLiteralStr, /) -> tuple[AnyOrLiteralStr, AnyOrLiteralStr, AnyOrLiteralStr]:
228
+ """
229
+ Split a pathname into drive, root and tail.
230
+
231
+ The tail contains anything after the root.
232
+ """
233
+ ...
228
234
  @overload
229
- def splitroot(path: PathLike[AnyStr], /) -> tuple[AnyStr, AnyStr, AnyStr]: ...
235
+ def splitroot(path: PathLike[AnyStr], /) -> tuple[AnyStr, AnyStr, AnyStr]:
236
+ """
237
+ Split a pathname into drive, root and tail.
238
+
239
+ The tail contains anything after the root.
240
+ """
241
+ ...
230
242
  else:
231
243
  @overload
232
244
  def splitroot(p: AnyOrLiteralStr) -> tuple[AnyOrLiteralStr, AnyOrLiteralStr, AnyOrLiteralStr]:
@@ -1,3 +1,3 @@
1
- from . import sampling as sampling, tracing as tracing
2
-
3
- __all__ = ("tracing", "sampling")
1
+ from . import sampling as sampling, tracing as tracing
2
+
3
+ __all__ = ("tracing", "sampling")
@@ -1,17 +1,17 @@
1
- from .collector import Collector as Collector
2
- from .gecko_collector import GeckoCollector as GeckoCollector
3
- from .heatmap_collector import HeatmapCollector as HeatmapCollector
4
- from .jsonl_collector import JsonlCollector as JsonlCollector
5
- from .pstats_collector import PstatsCollector as PstatsCollector
6
- from .stack_collector import CollapsedStackCollector as CollapsedStackCollector
7
- from .string_table import StringTable as StringTable
8
-
9
- __all__ = (
10
- "Collector",
11
- "PstatsCollector",
12
- "CollapsedStackCollector",
13
- "HeatmapCollector",
14
- "GeckoCollector",
15
- "JsonlCollector",
16
- "StringTable",
17
- )
1
+ from .collector import Collector as Collector
2
+ from .gecko_collector import GeckoCollector as GeckoCollector
3
+ from .heatmap_collector import HeatmapCollector as HeatmapCollector
4
+ from .jsonl_collector import JsonlCollector as JsonlCollector
5
+ from .pstats_collector import PstatsCollector as PstatsCollector
6
+ from .stack_collector import CollapsedStackCollector as CollapsedStackCollector
7
+ from .string_table import StringTable as StringTable
8
+
9
+ __all__ = (
10
+ "Collector",
11
+ "PstatsCollector",
12
+ "CollapsedStackCollector",
13
+ "HeatmapCollector",
14
+ "GeckoCollector",
15
+ "JsonlCollector",
16
+ "StringTable",
17
+ )
@@ -1,25 +1,25 @@
1
- from _typeshed import StrOrBytesPath
2
- from abc import ABC, abstractmethod
3
- from collections.abc import Sequence
4
- from typing import ClassVar, TypeAlias
5
-
6
- from _remote_debugging import AwaitedInfo, FrameInfo, InterpreterInfo, LocationInfo
7
-
8
- _Location: TypeAlias = int | tuple[int, int, int, int] | LocationInfo | None
9
- _Frame: TypeAlias = FrameInfo | tuple[str, _Location, str, int | None]
10
- _Timestamps: TypeAlias = Sequence[int] | None
11
-
12
- def normalize_location(location: _Location) -> tuple[int, int, int, int]: ...
13
- def extract_lineno(location: _Location) -> int: ...
14
- def filter_internal_frames(frames: Sequence[_Frame]) -> list[_Frame]: ...
15
- def iter_async_frames(awaited_info_list: Sequence[AwaitedInfo]) -> object: ...
16
-
17
- class Collector(ABC):
18
- aggregating: ClassVar[bool] # undocumented
19
- @abstractmethod
20
- def collect(
21
- self, stack_frames: Sequence[InterpreterInfo] | Sequence[AwaitedInfo], timestamps_us: _Timestamps = None
22
- ) -> None: ...
23
- def collect_failed_sample(self) -> None: ...
24
- @abstractmethod
25
- def export(self, filename: StrOrBytesPath) -> None: ...
1
+ from _typeshed import StrOrBytesPath
2
+ from abc import ABC, abstractmethod
3
+ from collections.abc import Sequence
4
+ from typing import ClassVar, TypeAlias
5
+
6
+ from _remote_debugging import AwaitedInfo, FrameInfo, InterpreterInfo, LocationInfo
7
+
8
+ _Location: TypeAlias = int | tuple[int, int, int, int] | LocationInfo | None
9
+ _Frame: TypeAlias = FrameInfo | tuple[str, _Location, str, int | None]
10
+ _Timestamps: TypeAlias = Sequence[int] | None
11
+
12
+ def normalize_location(location: _Location) -> tuple[int, int, int, int]: ...
13
+ def extract_lineno(location: _Location) -> int: ...
14
+ def filter_internal_frames(frames: Sequence[_Frame]) -> list[_Frame]: ...
15
+ def iter_async_frames(awaited_info_list: Sequence[AwaitedInfo]) -> object: ...
16
+
17
+ class Collector(ABC):
18
+ aggregating: ClassVar[bool] # undocumented
19
+ @abstractmethod
20
+ def collect(
21
+ self, stack_frames: Sequence[InterpreterInfo] | Sequence[AwaitedInfo], timestamps_us: _Timestamps = None
22
+ ) -> None: ...
23
+ def collect_failed_sample(self) -> None: ...
24
+ @abstractmethod
25
+ def export(self, filename: StrOrBytesPath) -> None: ...