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
@@ -1,111 +1,111 @@
1
- from _typeshed import Incomplete, StrOrBytesPath, StrPath
2
- from collections.abc import Generator, Sequence
3
- from tempfile import TemporaryDirectory
4
- from typing import Any, ClassVar, Final, TypedDict, type_check_only
5
-
6
- from _remote_debugging import AwaitedInfo, InterpreterInfo
7
-
8
- from .collector import Collector, _Timestamps
9
-
10
- @type_check_only
11
- class _GeckoCategory(TypedDict):
12
- name: str
13
- color: str
14
- subcategories: list[str]
15
-
16
- THREAD_STATUS_HAS_GIL: Final[int]
17
- THREAD_STATUS_ON_CPU: Final[int]
18
- THREAD_STATUS_UNKNOWN: Final[int]
19
- THREAD_STATUS_GIL_REQUESTED: Final[int]
20
- THREAD_STATUS_HAS_EXCEPTION: Final[int]
21
- THREAD_STATUS_MAIN_THREAD: Final[int]
22
-
23
- GECKO_CATEGORIES: Final[list[_GeckoCategory]]
24
-
25
- CATEGORY_OTHER: Final = 0
26
- CATEGORY_PYTHON: Final = 1
27
- CATEGORY_NATIVE: Final = 2
28
- CATEGORY_GC: Final = 3
29
- CATEGORY_GIL: Final = 4
30
- CATEGORY_CPU: Final = 5
31
- CATEGORY_CODE_TYPE: Final = 6
32
- CATEGORY_OPCODES: Final = 7
33
- CATEGORY_EXCEPTION: Final = 8
34
-
35
- DEFAULT_SUBCATEGORY: Final = 0
36
-
37
- GECKO_FORMAT_VERSION: Final = 32
38
- GECKO_PREPROCESSED_VERSION: Final = 57
39
-
40
- RESOURCE_TYPE_LIBRARY: Final = 1
41
-
42
- FRAME_ADDRESS_NONE: Final = -1
43
- FRAME_INLINE_DEPTH_ROOT: Final = 0
44
-
45
- PROCESS_TYPE_MAIN: Final = 0
46
- STACKWALK_DISABLED: Final = 0
47
-
48
- DEFAULT_SPILL_BUFFER_BYTES: Final[int]
49
-
50
- class SpillColumn:
51
- path: str
52
- buffer: bytearray
53
-
54
- def __init__(self, directory: StrPath, basename: StrPath, *, buffer_bytes: int | None = None) -> None: ...
55
- # "value" accepts the same types as json.JSONEncoder.encode()
56
- def append(self, value: Any) -> None: ...
57
- def flush(self) -> None: ...
58
- def iter_tokens(self) -> Generator[str]: ...
59
-
60
- class GeckoThreadSpill:
61
- sample_count: int
62
- marker_count: int
63
- def __init__(self, directory: StrPath, tid: int) -> None: ...
64
- def append_sample(self, stack_index: int, time_ms: float) -> None: ...
65
- def append_marker(
66
- self, name_idx: int, start_time: float, end_time: float, phase: int, category: int, data: dict[str, Any]
67
- ) -> None: ...
68
- def prepare_read(self) -> None: ...
69
-
70
- class GeckoCollector(Collector):
71
- aggregating: ClassVar[bool]
72
-
73
- sample_interval_usec: int
74
- skip_idle: bool
75
- opcodes_enabled: bool
76
- start_time: float
77
-
78
- global_strings: list[str]
79
- global_string_map: dict[str, int]
80
-
81
- threads: dict[int, dict[str, Any]]
82
- spill_dir: TemporaryDirectory[str] | None
83
- exported: bool
84
-
85
- libs: list[Incomplete]
86
-
87
- sample_count: int
88
- last_sample_time: float
89
- interval: float
90
-
91
- has_gil_start: dict[Incomplete, Incomplete]
92
- no_gil_start: dict[Incomplete, Incomplete]
93
- on_cpu_start: dict[Incomplete, Incomplete]
94
- off_cpu_start: dict[Incomplete, Incomplete]
95
- python_code_start: dict[Incomplete, Incomplete]
96
- native_code_start: dict[Incomplete, Incomplete]
97
- gil_wait_start: dict[Incomplete, Incomplete]
98
- exception_start: dict[Incomplete, Incomplete]
99
- no_exception_start: dict[Incomplete, Incomplete]
100
-
101
- gc_start_per_thread: dict[int, float]
102
-
103
- initialized_threads: set[Incomplete]
104
-
105
- opcode_state: dict[int, tuple[Incomplete, int, int, str, str, float]]
106
-
107
- def __init__(self, sample_interval_usec: int, *, skip_idle: bool = False, opcodes: bool = False) -> None: ...
108
- def collect(
109
- self, stack_frames: Sequence[InterpreterInfo] | Sequence[AwaitedInfo], timestamps_us: _Timestamps = None
110
- ) -> None: ...
111
- def export(self, filename: StrOrBytesPath) -> None: ...
1
+ from _typeshed import Incomplete, StrOrBytesPath, StrPath
2
+ from collections.abc import Generator, Sequence
3
+ from tempfile import TemporaryDirectory
4
+ from typing import Any, ClassVar, Final, TypedDict, type_check_only
5
+
6
+ from _remote_debugging import AwaitedInfo, InterpreterInfo
7
+
8
+ from .collector import Collector, _Timestamps
9
+
10
+ @type_check_only
11
+ class _GeckoCategory(TypedDict):
12
+ name: str
13
+ color: str
14
+ subcategories: list[str]
15
+
16
+ THREAD_STATUS_HAS_GIL: Final[int]
17
+ THREAD_STATUS_ON_CPU: Final[int]
18
+ THREAD_STATUS_UNKNOWN: Final[int]
19
+ THREAD_STATUS_GIL_REQUESTED: Final[int]
20
+ THREAD_STATUS_HAS_EXCEPTION: Final[int]
21
+ THREAD_STATUS_MAIN_THREAD: Final[int]
22
+
23
+ GECKO_CATEGORIES: Final[list[_GeckoCategory]]
24
+
25
+ CATEGORY_OTHER: Final = 0
26
+ CATEGORY_PYTHON: Final = 1
27
+ CATEGORY_NATIVE: Final = 2
28
+ CATEGORY_GC: Final = 3
29
+ CATEGORY_GIL: Final = 4
30
+ CATEGORY_CPU: Final = 5
31
+ CATEGORY_CODE_TYPE: Final = 6
32
+ CATEGORY_OPCODES: Final = 7
33
+ CATEGORY_EXCEPTION: Final = 8
34
+
35
+ DEFAULT_SUBCATEGORY: Final = 0
36
+
37
+ GECKO_FORMAT_VERSION: Final = 32
38
+ GECKO_PREPROCESSED_VERSION: Final = 57
39
+
40
+ RESOURCE_TYPE_LIBRARY: Final = 1
41
+
42
+ FRAME_ADDRESS_NONE: Final = -1
43
+ FRAME_INLINE_DEPTH_ROOT: Final = 0
44
+
45
+ PROCESS_TYPE_MAIN: Final = 0
46
+ STACKWALK_DISABLED: Final = 0
47
+
48
+ DEFAULT_SPILL_BUFFER_BYTES: Final[int]
49
+
50
+ class SpillColumn:
51
+ path: str
52
+ buffer: bytearray
53
+
54
+ def __init__(self, directory: StrPath, basename: StrPath, *, buffer_bytes: int | None = None) -> None: ...
55
+ # "value" accepts the same types as json.JSONEncoder.encode()
56
+ def append(self, value: Any) -> None: ...
57
+ def flush(self) -> None: ...
58
+ def iter_tokens(self) -> Generator[str]: ...
59
+
60
+ class GeckoThreadSpill:
61
+ sample_count: int
62
+ marker_count: int
63
+ def __init__(self, directory: StrPath, tid: int) -> None: ...
64
+ def append_sample(self, stack_index: int, time_ms: float) -> None: ...
65
+ def append_marker(
66
+ self, name_idx: int, start_time: float, end_time: float, phase: int, category: int, data: dict[str, Any]
67
+ ) -> None: ...
68
+ def prepare_read(self) -> None: ...
69
+
70
+ class GeckoCollector(Collector):
71
+ aggregating: ClassVar[bool]
72
+
73
+ sample_interval_usec: int
74
+ skip_idle: bool
75
+ opcodes_enabled: bool
76
+ start_time: float
77
+
78
+ global_strings: list[str]
79
+ global_string_map: dict[str, int]
80
+
81
+ threads: dict[int, dict[str, Any]]
82
+ spill_dir: TemporaryDirectory[str] | None
83
+ exported: bool
84
+
85
+ libs: list[Incomplete]
86
+
87
+ sample_count: int
88
+ last_sample_time: float
89
+ interval: float
90
+
91
+ has_gil_start: dict[Incomplete, Incomplete]
92
+ no_gil_start: dict[Incomplete, Incomplete]
93
+ on_cpu_start: dict[Incomplete, Incomplete]
94
+ off_cpu_start: dict[Incomplete, Incomplete]
95
+ python_code_start: dict[Incomplete, Incomplete]
96
+ native_code_start: dict[Incomplete, Incomplete]
97
+ gil_wait_start: dict[Incomplete, Incomplete]
98
+ exception_start: dict[Incomplete, Incomplete]
99
+ no_exception_start: dict[Incomplete, Incomplete]
100
+
101
+ gc_start_per_thread: dict[int, float]
102
+
103
+ initialized_threads: set[Incomplete]
104
+
105
+ opcode_state: dict[int, tuple[Incomplete, int, int, str, str, float]]
106
+
107
+ def __init__(self, sample_interval_usec: int, *, skip_idle: bool = False, opcodes: bool = False) -> None: ...
108
+ def collect(
109
+ self, stack_frames: Sequence[InterpreterInfo] | Sequence[AwaitedInfo], timestamps_us: _Timestamps = None
110
+ ) -> None: ...
111
+ def export(self, filename: StrOrBytesPath) -> None: ...
@@ -1,24 +1,24 @@
1
- from _typeshed import StrOrBytesPath
2
- from collections.abc import Sequence
3
-
4
- from _remote_debugging import AwaitedInfo, InterpreterInfo
5
-
6
- from .collector import Collector, _Frame, _Timestamps
7
-
8
- class HeatmapCollector(Collector):
9
- FILE_INDEX_FORMAT: str
10
- def __init__(self, sample_interval_usec: int, *, skip_idle: bool = False) -> None: ...
11
- def collect(
12
- self, stack_frames: Sequence[InterpreterInfo] | Sequence[AwaitedInfo], timestamps_us: _Timestamps = None
13
- ) -> None: ...
14
- def export(self, output_path: StrOrBytesPath) -> None: ...
15
- def process_frames(self, frames: Sequence[_Frame], thread_id: int, weight: int = 1) -> None: ...
16
- def set_stats(
17
- self,
18
- sample_interval_usec: int,
19
- duration_sec: float,
20
- sample_rate: float,
21
- error_rate: float | None = None,
22
- missed_samples: float | None = None,
23
- **kwargs: object,
24
- ) -> None: ...
1
+ from _typeshed import StrOrBytesPath
2
+ from collections.abc import Sequence
3
+
4
+ from _remote_debugging import AwaitedInfo, InterpreterInfo
5
+
6
+ from .collector import Collector, _Frame, _Timestamps
7
+
8
+ class HeatmapCollector(Collector):
9
+ FILE_INDEX_FORMAT: str
10
+ def __init__(self, sample_interval_usec: int, *, skip_idle: bool = False) -> None: ...
11
+ def collect(
12
+ self, stack_frames: Sequence[InterpreterInfo] | Sequence[AwaitedInfo], timestamps_us: _Timestamps = None
13
+ ) -> None: ...
14
+ def export(self, output_path: StrOrBytesPath) -> None: ...
15
+ def process_frames(self, frames: Sequence[_Frame], thread_id: int, weight: int = 1) -> None: ...
16
+ def set_stats(
17
+ self,
18
+ sample_interval_usec: int,
19
+ duration_sec: float,
20
+ sample_rate: float,
21
+ error_rate: float | None = None,
22
+ missed_samples: float | None = None,
23
+ **kwargs: object,
24
+ ) -> None: ...
@@ -1,15 +1,15 @@
1
- from _typeshed import StrOrBytesPath
2
- from collections.abc import Sequence
3
-
4
- from _remote_debugging import AwaitedInfo, InterpreterInfo
5
-
6
- from .collector import _Frame, _Timestamps
7
- from .stack_collector import StackTraceCollector
8
-
9
- class JsonlCollector(StackTraceCollector):
10
- def __init__(self, sample_interval_usec: int, *, skip_idle: bool = False, mode: int | None = None) -> None: ...
11
- def collect(
12
- self, stack_frames: Sequence[InterpreterInfo] | Sequence[AwaitedInfo], timestamps_us: _Timestamps = None
13
- ) -> None: ...
14
- def export(self, filename: StrOrBytesPath) -> None: ...
15
- def process_frames(self, frames: Sequence[_Frame], _thread_id: int, weight: int = 1) -> None: ...
1
+ from _typeshed import StrOrBytesPath
2
+ from collections.abc import Sequence
3
+
4
+ from _remote_debugging import AwaitedInfo, InterpreterInfo
5
+
6
+ from .collector import _Frame, _Timestamps
7
+ from .stack_collector import StackTraceCollector
8
+
9
+ class JsonlCollector(StackTraceCollector):
10
+ def __init__(self, sample_interval_usec: int, *, skip_idle: bool = False, mode: int | None = None) -> None: ...
11
+ def collect(
12
+ self, stack_frames: Sequence[InterpreterInfo] | Sequence[AwaitedInfo], timestamps_us: _Timestamps = None
13
+ ) -> None: ...
14
+ def export(self, filename: StrOrBytesPath) -> None: ...
15
+ def process_frames(self, frames: Sequence[_Frame], _thread_id: int, weight: int = 1) -> None: ...
@@ -1,17 +1,17 @@
1
- from _typeshed import StrOrBytesPath
2
- from collections.abc import Sequence
3
-
4
- from _remote_debugging import AwaitedInfo, InterpreterInfo
5
-
6
- from .collector import Collector, _Timestamps
7
-
8
- class PstatsCollector(Collector):
9
- def __init__(self, sample_interval_usec: int, *, skip_idle: bool = False) -> None: ...
10
- def collect(
11
- self, stack_frames: Sequence[InterpreterInfo] | Sequence[AwaitedInfo], timestamps_us: _Timestamps = None
12
- ) -> None: ...
13
- def export(self, filename: StrOrBytesPath) -> None: ...
14
- def create_stats(self) -> None: ...
15
- def print_stats(
16
- self, sort: int = -1, limit: int | None = None, show_summary: bool = True, mode: int | None = None
17
- ) -> None: ...
1
+ from _typeshed import StrOrBytesPath
2
+ from collections.abc import Sequence
3
+
4
+ from _remote_debugging import AwaitedInfo, InterpreterInfo
5
+
6
+ from .collector import Collector, _Timestamps
7
+
8
+ class PstatsCollector(Collector):
9
+ def __init__(self, sample_interval_usec: int, *, skip_idle: bool = False) -> None: ...
10
+ def collect(
11
+ self, stack_frames: Sequence[InterpreterInfo] | Sequence[AwaitedInfo], timestamps_us: _Timestamps = None
12
+ ) -> None: ...
13
+ def export(self, filename: StrOrBytesPath) -> None: ...
14
+ def create_stats(self) -> None: ...
15
+ def print_stats(
16
+ self, sort: int = -1, limit: int | None = None, show_summary: bool = True, mode: int | None = None
17
+ ) -> None: ...
@@ -1,39 +1,39 @@
1
- from _typeshed import StrOrBytesPath
2
- from abc import ABCMeta
3
- from collections.abc import Sequence
4
-
5
- from _remote_debugging import AwaitedInfo, InterpreterInfo
6
-
7
- from .collector import Collector, _Frame, _Timestamps
8
-
9
- class StackTraceCollector(Collector, metaclass=ABCMeta):
10
- def __init__(self, sample_interval_usec: int, *, skip_idle: bool = False) -> None: ...
11
- def collect(
12
- self, stack_frames: Sequence[InterpreterInfo] | Sequence[AwaitedInfo], timestamps_us: _Timestamps = None
13
- ) -> None: ...
14
- def process_frames(self, frames: Sequence[_Frame], thread_id: int, weight: int = 1) -> None: ...
15
-
16
- class CollapsedStackCollector(StackTraceCollector):
17
- def __init__(self, sample_interval_usec: int, *, skip_idle: bool = False) -> None: ...
18
- def process_frames(self, frames: Sequence[_Frame], thread_id: int, weight: int = 1) -> None: ...
19
- def export(self, filename: StrOrBytesPath) -> None: ...
20
-
21
- class FlamegraphCollector(StackTraceCollector):
22
- def __init__(self, sample_interval_usec: int, *, skip_idle: bool = False) -> None: ...
23
- def collect(
24
- self, stack_frames: Sequence[InterpreterInfo] | Sequence[AwaitedInfo], timestamps_us: _Timestamps = None
25
- ) -> None: ...
26
- def set_stats(
27
- self,
28
- sample_interval_usec: int,
29
- duration_sec: float,
30
- sample_rate: float,
31
- error_rate: float | None = None,
32
- missed_samples: float | None = None,
33
- mode: int | None = None,
34
- ) -> None: ...
35
- def export(self, filename: StrOrBytesPath) -> None: ...
36
- def process_frames(self, frames: Sequence[_Frame], thread_id: int, weight: int = 1) -> None: ...
37
-
38
- class DiffFlamegraphCollector(FlamegraphCollector):
39
- def __init__(self, sample_interval_usec: int, *, baseline_binary_path: StrOrBytesPath, skip_idle: bool = False) -> None: ...
1
+ from _typeshed import StrOrBytesPath
2
+ from abc import ABCMeta
3
+ from collections.abc import Sequence
4
+
5
+ from _remote_debugging import AwaitedInfo, InterpreterInfo
6
+
7
+ from .collector import Collector, _Frame, _Timestamps
8
+
9
+ class StackTraceCollector(Collector, metaclass=ABCMeta):
10
+ def __init__(self, sample_interval_usec: int, *, skip_idle: bool = False) -> None: ...
11
+ def collect(
12
+ self, stack_frames: Sequence[InterpreterInfo] | Sequence[AwaitedInfo], timestamps_us: _Timestamps = None
13
+ ) -> None: ...
14
+ def process_frames(self, frames: Sequence[_Frame], thread_id: int, weight: int = 1) -> None: ...
15
+
16
+ class CollapsedStackCollector(StackTraceCollector):
17
+ def __init__(self, sample_interval_usec: int, *, skip_idle: bool = False) -> None: ...
18
+ def process_frames(self, frames: Sequence[_Frame], thread_id: int, weight: int = 1) -> None: ...
19
+ def export(self, filename: StrOrBytesPath) -> None: ...
20
+
21
+ class FlamegraphCollector(StackTraceCollector):
22
+ def __init__(self, sample_interval_usec: int, *, skip_idle: bool = False) -> None: ...
23
+ def collect(
24
+ self, stack_frames: Sequence[InterpreterInfo] | Sequence[AwaitedInfo], timestamps_us: _Timestamps = None
25
+ ) -> None: ...
26
+ def set_stats(
27
+ self,
28
+ sample_interval_usec: int,
29
+ duration_sec: float,
30
+ sample_rate: float,
31
+ error_rate: float | None = None,
32
+ missed_samples: float | None = None,
33
+ mode: int | None = None,
34
+ ) -> None: ...
35
+ def export(self, filename: StrOrBytesPath) -> None: ...
36
+ def process_frames(self, frames: Sequence[_Frame], thread_id: int, weight: int = 1) -> None: ...
37
+
38
+ class DiffFlamegraphCollector(FlamegraphCollector):
39
+ def __init__(self, sample_interval_usec: int, *, baseline_binary_path: StrOrBytesPath, skip_idle: bool = False) -> None: ...
@@ -1,5 +1,5 @@
1
- class StringTable:
2
- def intern(self, string: object) -> int: ...
3
- def get_string(self, index: int) -> str: ...
4
- def get_strings(self) -> list[str]: ...
5
- def __len__(self) -> int: ...
1
+ class StringTable:
2
+ def intern(self, string: object) -> int: ...
3
+ def get_string(self, index: int) -> str: ...
4
+ def get_strings(self) -> list[str]: ...
5
+ def __len__(self) -> int: ...
@@ -1,9 +1,9 @@
1
- from cProfile import Profile as Profile, run as run, runctx as runctx
2
- from types import CodeType
3
- from typing import TypeAlias
4
-
5
- __all__ = ("run", "runctx", "Profile")
6
-
7
- _Label: TypeAlias = tuple[str, int, str]
8
-
9
- def label(code: str | CodeType) -> _Label: ... # undocumented
1
+ from cProfile import Profile as Profile, run as run, runctx as runctx
2
+ from types import CodeType
3
+ from typing import TypeAlias
4
+
5
+ __all__ = ("run", "runctx", "Profile")
6
+
7
+ _Label: TypeAlias = tuple[str, int, str]
8
+
9
+ def label(code: str | CodeType) -> _Label: ... # undocumented
@@ -82,8 +82,9 @@ class XMLParserType:
82
82
  """
83
83
  Sets the number of allocated bytes of dynamic memory needed to activate protection against disproportionate use of RAM.
84
84
 
85
- Parser objects usually have an allocation activation threshold of 64 MiB,
86
- but the actual default value depends on the underlying Expat library.
85
+ Parser objects usually have an allocation activation threshold of
86
+ 64 MiB, but the actual default value depends on the underlying Expat
87
+ library.
87
88
  """
88
89
  ...
89
90
  def SetAllocTrackerMaximumAmplification(self, max_factor: float, /) -> None:
@@ -102,7 +103,8 @@ class XMLParserType:
102
103
  be carefully chosen to avoid false positives.
103
104
 
104
105
  Parser objects usually have a maximum amplification factor of 100,
105
- but the actual default value depends on the underlying Expat library.
106
+ but the actual default value depends on the underlying Expat
107
+ library.
106
108
  """
107
109
  ...
108
110
  if sys.version_info >= (3, 13):
@@ -111,32 +113,36 @@ class XMLParserType:
111
113
  """
112
114
  Sets the number of output bytes needed to activate protection against billion laughs attacks.
113
115
 
114
- The number of output bytes includes amplification from entity expansion
115
- and reading DTD files.
116
+ The number of output bytes includes amplification from entity
117
+ expansion and reading DTD files.
116
118
 
117
- Parser objects usually have a protection activation threshold of 8 MiB,
118
- but the actual default value depends on the underlying Expat library.
119
+ Parser objects usually have a protection activation threshold of
120
+ 8 MiB, but the actual default value depends on the underlying Expat
121
+ library.
119
122
 
120
- Activation thresholds below 4 MiB are known to break support for DITA 1.3
121
- payload and are hence not recommended.
123
+ Activation thresholds below 4 MiB are known to break support for
124
+ DITA 1.3 payload and are hence not recommended.
122
125
  """
123
126
  ...
124
127
  def SetBillionLaughsAttackProtectionMaximumAmplification(self, max_factor: float, /) -> None:
125
128
  """
126
129
  Sets the maximum tolerated amplification factor for protection against billion laughs attacks.
127
130
 
128
- The amplification factor is calculated as "(direct + indirect) / direct"
129
- while parsing, where "direct" is the number of bytes read from the primary
130
- document in parsing and "indirect" is the number of bytes added by expanding
131
- entities and reading external DTD files, combined.
131
+ The amplification factor is calculated as "(direct + indirect) /
132
+ direct" while parsing, where "direct" is the number of bytes read
133
+ from the primary document in parsing and "indirect" is the number of
134
+ bytes added by expanding entities and reading external DTD files,
135
+ combined.
132
136
 
133
- The 'max_factor' value must be a non-NaN floating point value greater than
134
- or equal to 1.0. Amplification factors greater than 30,000 can be observed
135
- in the middle of parsing even with benign files in practice. In particular,
136
- the activation threshold should be carefully chosen to avoid false positives.
137
+ The 'max_factor' value must be a non-NaN floating point value
138
+ greater than or equal to 1.0. Amplification factors greater than
139
+ 30,000 can be observed in the middle of parsing even with benign
140
+ files in practice. In particular, the activation threshold should
141
+ be carefully chosen to avoid false positives.
137
142
 
138
143
  Parser objects usually have a maximum amplification factor of 100,
139
- but the actual default value depends on the underlying Expat library.
144
+ but the actual default value depends on the underlying Expat
145
+ library.
140
146
  """
141
147
  ...
142
148
 
@@ -247,15 +247,30 @@ class Pattern(Generic[AnyStr]):
247
247
 
248
248
  @overload
249
249
  def match(self: Pattern[str], string: str, pos: int = 0, endpos: int = sys.maxsize) -> Match[str] | None:
250
- """Matches zero or more characters at the beginning of the string."""
250
+ """
251
+ prefixmatch($self, /, string, pos=0, endpos=sys.maxsize)
252
+ --
253
+
254
+ Matches zero or more characters at the beginning of the string.
255
+ """
251
256
  ...
252
257
  @overload
253
258
  def match(self: Pattern[bytes], string: ReadableBuffer, pos: int = 0, endpos: int = sys.maxsize) -> Match[bytes] | None:
254
- """Matches zero or more characters at the beginning of the string."""
259
+ """
260
+ prefixmatch($self, /, string, pos=0, endpos=sys.maxsize)
261
+ --
262
+
263
+ Matches zero or more characters at the beginning of the string.
264
+ """
255
265
  ...
256
266
  @overload
257
267
  def match(self, string: AnyStr, pos: int = 0, endpos: int = sys.maxsize) -> Match[AnyStr] | None:
258
- """Matches zero or more characters at the beginning of the string."""
268
+ """
269
+ prefixmatch($self, /, string, pos=0, endpos=sys.maxsize)
270
+ --
271
+
272
+ Matches zero or more characters at the beginning of the string.
273
+ """
259
274
  ...
260
275
 
261
276
  if sys.version_info >= (3, 15):
@@ -66,7 +66,7 @@ def select(
66
66
  gotten from a fileno() method call on one of those.
67
67
 
68
68
  The optional 4th argument specifies a timeout in seconds; it may be
69
- a floating-point number to specify fractions of seconds. If it is absent
69
+ a non-integer to specify fractions of seconds. If it is absent
70
70
  or None, the call will never time out.
71
71
 
72
72
  The return value is a tuple of three lists corresponding to the first
@@ -152,7 +152,7 @@ if sys.platform != "linux" and sys.platform != "win32":
152
152
  The maximum number of events that the kernel will return.
153
153
  timeout
154
154
  The maximum time to wait in seconds, or else None to wait forever.
155
- This accepts floats for smaller timeouts, too.
155
+ This accepts non-integers for smaller timeouts, too.
156
156
  """
157
157
  ...
158
158
  def fileno(self) -> int:
@@ -210,7 +210,7 @@ else:
210
210
  """
211
211
  Like sigwaitinfo(), but with a timeout.
212
212
 
213
- The timeout is specified in seconds, with floating-point numbers allowed.
213
+ The timeout is specified in seconds, rounded up to nanoseconds.
214
214
  """
215
215
  ...
216
216
  def sigwaitinfo(sigset: Iterable[int], /) -> struct_siginfo:
@@ -363,7 +363,9 @@ class Connection:
363
363
  """
364
364
  ...
365
365
  if sys.version_info >= (3, 15):
366
- def create_aggregate(self, name: str, n_arg: int, aggregate_class: Callable[[], _AggregateProtocol], /) -> None: ...
366
+ def create_aggregate(self, name: str, n_arg: int, aggregate_class: Callable[[], _AggregateProtocol], /) -> None:
367
+ """Creates a new aggregate."""
368
+ ...
367
369
  else:
368
370
  def create_aggregate(self, name: str, n_arg: int, aggregate_class: Callable[[], _AggregateProtocol]) -> None:
369
371
  """
@@ -437,7 +439,9 @@ class Connection:
437
439
  if sys.version_info >= (3, 15):
438
440
  def create_function(
439
441
  self, name: str, narg: int, func: Callable[..., _SqliteData] | None, /, *, deterministic: bool = False
440
- ) -> None: ...
442
+ ) -> None:
443
+ """Creates a new function."""
444
+ ...
441
445
  else:
442
446
  def create_function(
443
447
  self, name: str, narg: int, func: Callable[..., _SqliteData] | None, *, deterministic: bool = False
@@ -496,9 +500,28 @@ class Connection:
496
500
  if sys.version_info >= (3, 15):
497
501
  def set_authorizer(
498
502
  self, authorizer_callback: Callable[[int, str | None, str | None, str | None, str | None], int] | None, /
499
- ) -> None: ...
500
- def set_progress_handler(self, progress_handler: Callable[[], int | None] | None, /, n: int) -> None: ...
501
- def set_trace_callback(self, trace_callback: Callable[[str], object] | None, /) -> None: ...
503
+ ) -> None:
504
+ """Set authorizer callback."""
505
+ ...
506
+ def set_progress_handler(self, progress_handler: Callable[[], int | None] | None, /, n: int) -> None:
507
+ """
508
+ Set progress handler callback.
509
+
510
+ progress_handler
511
+ A callable that takes no arguments.
512
+ If the callable returns non-zero, the current query is
513
+ terminated, and an exception is raised.
514
+ n
515
+ The number of SQLite virtual machine instructions that are
516
+ executed between invocations of 'progress_handler'.
517
+
518
+ If 'progress_handler' is None or 'n' is 0, the progress handler is
519
+ disabled.
520
+ """
521
+ ...
522
+ def set_trace_callback(self, trace_callback: Callable[[str], object] | None, /) -> None:
523
+ """Set a trace callback called for each SQL statement (passed as unicode)."""
524
+ ...
502
525
  else:
503
526
  def set_authorizer(
504
527
  self, authorizer_callback: Callable[[int, str | None, str | None, str | None, str | None], int] | None