basedpyright 1.31.6 → 1.31.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/README.md +1 -1
  2. package/dist/pyright-langserver.js +1 -1
  3. package/dist/pyright-langserver.js.map +1 -1
  4. package/dist/pyright.js +1 -1
  5. package/dist/pyright.js.map +1 -1
  6. package/dist/typeshed-fallback/stdlib/_asyncio.pyi +6 -2
  7. package/dist/typeshed-fallback/stdlib/_compression.pyi +28 -28
  8. package/dist/typeshed-fallback/stdlib/_contextvars.pyi +6 -2
  9. package/dist/typeshed-fallback/stdlib/_ctypes.pyi +10 -51
  10. package/dist/typeshed-fallback/stdlib/_curses.pyi +187 -17
  11. package/dist/typeshed-fallback/stdlib/_decimal.pyi +7 -1
  12. package/dist/typeshed-fallback/stdlib/_heapq.pyi +20 -5
  13. package/dist/typeshed-fallback/stdlib/_interpqueues.pyi +6 -6
  14. package/dist/typeshed-fallback/stdlib/_interpreters.pyi +1 -7
  15. package/dist/typeshed-fallback/stdlib/_io.pyi +9 -5
  16. package/dist/typeshed-fallback/stdlib/_lsprof.pyi +12 -20
  17. package/dist/typeshed-fallback/stdlib/_operator.pyi +6 -2
  18. package/dist/typeshed-fallback/stdlib/_pickle.pyi +3 -3
  19. package/dist/typeshed-fallback/stdlib/_posixsubprocess.pyi +26 -26
  20. package/dist/typeshed-fallback/stdlib/_socket.pyi +6 -18
  21. package/dist/typeshed-fallback/stdlib/_stat.pyi +1 -1
  22. package/dist/typeshed-fallback/stdlib/_thread.pyi +10 -2
  23. package/dist/typeshed-fallback/stdlib/_zstd.pyi +300 -97
  24. package/dist/typeshed-fallback/stdlib/annotationlib.pyi +146 -146
  25. package/dist/typeshed-fallback/stdlib/ast.pyi +256 -96
  26. package/dist/typeshed-fallback/stdlib/asyncio/graph.pyi +28 -28
  27. package/dist/typeshed-fallback/stdlib/asyncio/tasks.pyi +3 -1
  28. package/dist/typeshed-fallback/stdlib/asyncio/tools.pyi +46 -46
  29. package/dist/typeshed-fallback/stdlib/builtins.pyi +46 -36
  30. package/dist/typeshed-fallback/stdlib/compression/_common/_streams.pyi +26 -26
  31. package/dist/typeshed-fallback/stdlib/compression/bz2.pyi +1 -1
  32. package/dist/typeshed-fallback/stdlib/compression/gzip.pyi +1 -1
  33. package/dist/typeshed-fallback/stdlib/compression/lzma.pyi +1 -1
  34. package/dist/typeshed-fallback/stdlib/compression/zlib.pyi +1 -1
  35. package/dist/typeshed-fallback/stdlib/compression/zstd/__init__.pyi +88 -88
  36. package/dist/typeshed-fallback/stdlib/compression/zstd/_zstdfile.pyi +117 -117
  37. package/dist/typeshed-fallback/stdlib/concurrent/futures/interpreter.pyi +79 -79
  38. package/dist/typeshed-fallback/stdlib/concurrent/futures/thread.pyi +8 -8
  39. package/dist/typeshed-fallback/stdlib/concurrent/interpreters/__init__.pyi +68 -68
  40. package/dist/typeshed-fallback/stdlib/concurrent/interpreters/_crossinterp.pyi +30 -30
  41. package/dist/typeshed-fallback/stdlib/concurrent/interpreters/_queues.pyi +74 -74
  42. package/dist/typeshed-fallback/stdlib/ctypes/__init__.pyi +7 -1
  43. package/dist/typeshed-fallback/stdlib/datetime.pyi +6 -2
  44. package/dist/typeshed-fallback/stdlib/decimal.pyi +12 -1
  45. package/dist/typeshed-fallback/stdlib/faulthandler.pyi +7 -5
  46. package/dist/typeshed-fallback/stdlib/functools.pyi +5 -9
  47. package/dist/typeshed-fallback/stdlib/gc.pyi +1 -1
  48. package/dist/typeshed-fallback/stdlib/marshal.pyi +6 -6
  49. package/dist/typeshed-fallback/stdlib/math.pyi +1 -3
  50. package/dist/typeshed-fallback/stdlib/multiprocessing/managers.pyi +3 -1
  51. package/dist/typeshed-fallback/stdlib/numbers.pyi +2 -10
  52. package/dist/typeshed-fallback/stdlib/os/__init__.pyi +15 -1
  53. package/dist/typeshed-fallback/stdlib/pathlib/__init__.pyi +6 -1
  54. package/dist/typeshed-fallback/stdlib/pathlib/types.pyi +8 -8
  55. package/dist/typeshed-fallback/stdlib/pyexpat/__init__.pyi +1 -1
  56. package/dist/typeshed-fallback/stdlib/string/templatelib.pyi +46 -36
  57. package/dist/typeshed-fallback/stdlib/sys/__init__.pyi +25 -2
  58. package/dist/typeshed-fallback/stdlib/tkinter/__init__.pyi +7 -1
  59. package/dist/typeshed-fallback/stdlib/types.pyi +22 -8
  60. package/dist/typeshed-fallback/stdlib/unicodedata.pyi +2 -2
  61. package/dist/typeshed-fallback/stdlib/winsound.pyi +4 -0
  62. package/dist/typeshed-fallback/stdlib/xxlimited.pyi +3 -16
  63. package/package.json +1 -1
@@ -1,146 +1,146 @@
1
- import sys
2
- from typing import Literal
3
-
4
- if sys.version_info >= (3, 14):
5
- import enum
6
- import types
7
- from _typeshed import AnnotateFunc, AnnotationForm, EvaluateFunc, SupportsItems
8
- from collections.abc import Mapping
9
- from typing import Any, ParamSpec, TypeVar, TypeVarTuple, final, overload
10
- from warnings import deprecated
11
-
12
- __all__ = [
13
- "Format",
14
- "ForwardRef",
15
- "call_annotate_function",
16
- "call_evaluate_function",
17
- "get_annotate_from_class_namespace",
18
- "get_annotations",
19
- "annotations_to_string",
20
- "type_repr",
21
- ]
22
-
23
- class Format(enum.IntEnum):
24
- VALUE = 1
25
- VALUE_WITH_FAKE_GLOBALS = 2
26
- FORWARDREF = 3
27
- STRING = 4
28
-
29
- @final
30
- class ForwardRef:
31
- __slots__ = (
32
- "__forward_is_argument__",
33
- "__forward_is_class__",
34
- "__forward_module__",
35
- "__weakref__",
36
- "__arg__",
37
- "__globals__",
38
- "__extra_names__",
39
- "__code__",
40
- "__ast_node__",
41
- "__cell__",
42
- "__owner__",
43
- "__stringifier_dict__",
44
- )
45
- __forward_is_argument__: bool
46
- __forward_is_class__: bool
47
- __forward_module__: str | None
48
- def __init__(
49
- self, arg: str, *, module: str | None = None, owner: object = None, is_argument: bool = True, is_class: bool = False
50
- ) -> None: ...
51
- @overload
52
- def evaluate(
53
- self,
54
- *,
55
- globals: dict[str, Any] | None = None,
56
- locals: Mapping[str, Any] | None = None,
57
- type_params: tuple[TypeVar | ParamSpec | TypeVarTuple, ...] | None = None,
58
- owner: object = None,
59
- format: Literal[Format.STRING],
60
- ) -> str: ...
61
- @overload
62
- def evaluate(
63
- self,
64
- *,
65
- globals: dict[str, Any] | None = None,
66
- locals: Mapping[str, Any] | None = None,
67
- type_params: tuple[TypeVar | ParamSpec | TypeVarTuple, ...] | None = None,
68
- owner: object = None,
69
- format: Literal[Format.FORWARDREF],
70
- ) -> AnnotationForm | ForwardRef: ...
71
- @overload
72
- def evaluate(
73
- self,
74
- *,
75
- globals: dict[str, Any] | None = None,
76
- locals: Mapping[str, Any] | None = None,
77
- type_params: tuple[TypeVar | ParamSpec | TypeVarTuple, ...] | None = None,
78
- owner: object = None,
79
- format: Format = Format.VALUE, # noqa: Y011
80
- ) -> AnnotationForm: ...
81
- @deprecated("Use `ForwardRef.evaluate()` or `typing.evaluate_forward_ref()` instead.")
82
- def _evaluate(
83
- self,
84
- globalns: dict[str, Any] | None,
85
- localns: Mapping[str, Any] | None,
86
- type_params: tuple[TypeVar | ParamSpec | TypeVarTuple, ...] = ...,
87
- *,
88
- recursive_guard: frozenset[str],
89
- ) -> AnnotationForm: ...
90
- @property
91
- def __forward_arg__(self) -> str: ...
92
- @property
93
- def __forward_code__(self) -> types.CodeType: ...
94
- def __eq__(self, other: object) -> bool: ...
95
- def __hash__(self) -> int: ...
96
- def __or__(self, other: Any) -> types.UnionType: ...
97
- def __ror__(self, other: Any) -> types.UnionType: ...
98
-
99
- @overload
100
- def call_evaluate_function(evaluate: EvaluateFunc, format: Literal[Format.STRING], *, owner: object = None) -> str: ...
101
- @overload
102
- def call_evaluate_function(
103
- evaluate: EvaluateFunc, format: Literal[Format.FORWARDREF], *, owner: object = None
104
- ) -> AnnotationForm | ForwardRef: ...
105
- @overload
106
- def call_evaluate_function(evaluate: EvaluateFunc, format: Format, *, owner: object = None) -> AnnotationForm: ...
107
- @overload
108
- def call_annotate_function(
109
- annotate: AnnotateFunc, format: Literal[Format.STRING], *, owner: object = None
110
- ) -> dict[str, str]: ...
111
- @overload
112
- def call_annotate_function(
113
- annotate: AnnotateFunc, format: Literal[Format.FORWARDREF], *, owner: object = None
114
- ) -> dict[str, AnnotationForm | ForwardRef]: ...
115
- @overload
116
- def call_annotate_function(annotate: AnnotateFunc, format: Format, *, owner: object = None) -> dict[str, AnnotationForm]: ...
117
- def get_annotate_from_class_namespace(obj: Mapping[str, object]) -> AnnotateFunc | None: ...
118
- @overload
119
- def get_annotations(
120
- obj: Any, # any object with __annotations__ or __annotate__
121
- *,
122
- globals: dict[str, object] | None = None,
123
- locals: Mapping[str, object] | None = None,
124
- eval_str: bool = False,
125
- format: Literal[Format.STRING],
126
- ) -> dict[str, str]: ...
127
- @overload
128
- def get_annotations(
129
- obj: Any,
130
- *,
131
- globals: dict[str, object] | None = None,
132
- locals: Mapping[str, object] | None = None,
133
- eval_str: bool = False,
134
- format: Literal[Format.FORWARDREF],
135
- ) -> dict[str, AnnotationForm | ForwardRef]: ...
136
- @overload
137
- def get_annotations(
138
- obj: Any,
139
- *,
140
- globals: dict[str, object] | None = None,
141
- locals: Mapping[str, object] | None = None,
142
- eval_str: bool = False,
143
- format: Format = Format.VALUE, # noqa: Y011
144
- ) -> dict[str, AnnotationForm]: ...
145
- def type_repr(value: object) -> str: ...
146
- def annotations_to_string(annotations: SupportsItems[str, object]) -> dict[str, str]: ...
1
+ import sys
2
+ from typing import Literal
3
+
4
+ if sys.version_info >= (3, 14):
5
+ import enum
6
+ import types
7
+ from _typeshed import AnnotateFunc, AnnotationForm, EvaluateFunc, SupportsItems
8
+ from collections.abc import Mapping
9
+ from typing import Any, ParamSpec, TypeVar, TypeVarTuple, final, overload
10
+ from warnings import deprecated
11
+
12
+ __all__ = [
13
+ "Format",
14
+ "ForwardRef",
15
+ "call_annotate_function",
16
+ "call_evaluate_function",
17
+ "get_annotate_from_class_namespace",
18
+ "get_annotations",
19
+ "annotations_to_string",
20
+ "type_repr",
21
+ ]
22
+
23
+ class Format(enum.IntEnum):
24
+ VALUE = 1
25
+ VALUE_WITH_FAKE_GLOBALS = 2
26
+ FORWARDREF = 3
27
+ STRING = 4
28
+
29
+ @final
30
+ class ForwardRef:
31
+ __slots__ = (
32
+ "__forward_is_argument__",
33
+ "__forward_is_class__",
34
+ "__forward_module__",
35
+ "__weakref__",
36
+ "__arg__",
37
+ "__globals__",
38
+ "__extra_names__",
39
+ "__code__",
40
+ "__ast_node__",
41
+ "__cell__",
42
+ "__owner__",
43
+ "__stringifier_dict__",
44
+ )
45
+ __forward_is_argument__: bool
46
+ __forward_is_class__: bool
47
+ __forward_module__: str | None
48
+ def __init__(
49
+ self, arg: str, *, module: str | None = None, owner: object = None, is_argument: bool = True, is_class: bool = False
50
+ ) -> None: ...
51
+ @overload
52
+ def evaluate(
53
+ self,
54
+ *,
55
+ globals: dict[str, Any] | None = None,
56
+ locals: Mapping[str, Any] | None = None,
57
+ type_params: tuple[TypeVar | ParamSpec | TypeVarTuple, ...] | None = None,
58
+ owner: object = None,
59
+ format: Literal[Format.STRING],
60
+ ) -> str: ...
61
+ @overload
62
+ def evaluate(
63
+ self,
64
+ *,
65
+ globals: dict[str, Any] | None = None,
66
+ locals: Mapping[str, Any] | None = None,
67
+ type_params: tuple[TypeVar | ParamSpec | TypeVarTuple, ...] | None = None,
68
+ owner: object = None,
69
+ format: Literal[Format.FORWARDREF],
70
+ ) -> AnnotationForm | ForwardRef: ...
71
+ @overload
72
+ def evaluate(
73
+ self,
74
+ *,
75
+ globals: dict[str, Any] | None = None,
76
+ locals: Mapping[str, Any] | None = None,
77
+ type_params: tuple[TypeVar | ParamSpec | TypeVarTuple, ...] | None = None,
78
+ owner: object = None,
79
+ format: Format = Format.VALUE, # noqa: Y011
80
+ ) -> AnnotationForm: ...
81
+ @deprecated("Use `ForwardRef.evaluate()` or `typing.evaluate_forward_ref()` instead.")
82
+ def _evaluate(
83
+ self,
84
+ globalns: dict[str, Any] | None,
85
+ localns: Mapping[str, Any] | None,
86
+ type_params: tuple[TypeVar | ParamSpec | TypeVarTuple, ...] = ...,
87
+ *,
88
+ recursive_guard: frozenset[str],
89
+ ) -> AnnotationForm: ...
90
+ @property
91
+ def __forward_arg__(self) -> str: ...
92
+ @property
93
+ def __forward_code__(self) -> types.CodeType: ...
94
+ def __eq__(self, other: object) -> bool: ...
95
+ def __hash__(self) -> int: ...
96
+ def __or__(self, other: Any) -> types.UnionType: ...
97
+ def __ror__(self, other: Any) -> types.UnionType: ...
98
+
99
+ @overload
100
+ def call_evaluate_function(evaluate: EvaluateFunc, format: Literal[Format.STRING], *, owner: object = None) -> str: ...
101
+ @overload
102
+ def call_evaluate_function(
103
+ evaluate: EvaluateFunc, format: Literal[Format.FORWARDREF], *, owner: object = None
104
+ ) -> AnnotationForm | ForwardRef: ...
105
+ @overload
106
+ def call_evaluate_function(evaluate: EvaluateFunc, format: Format, *, owner: object = None) -> AnnotationForm: ...
107
+ @overload
108
+ def call_annotate_function(
109
+ annotate: AnnotateFunc, format: Literal[Format.STRING], *, owner: object = None
110
+ ) -> dict[str, str]: ...
111
+ @overload
112
+ def call_annotate_function(
113
+ annotate: AnnotateFunc, format: Literal[Format.FORWARDREF], *, owner: object = None
114
+ ) -> dict[str, AnnotationForm | ForwardRef]: ...
115
+ @overload
116
+ def call_annotate_function(annotate: AnnotateFunc, format: Format, *, owner: object = None) -> dict[str, AnnotationForm]: ...
117
+ def get_annotate_from_class_namespace(obj: Mapping[str, object]) -> AnnotateFunc | None: ...
118
+ @overload
119
+ def get_annotations(
120
+ obj: Any, # any object with __annotations__ or __annotate__
121
+ *,
122
+ globals: dict[str, object] | None = None,
123
+ locals: Mapping[str, object] | None = None,
124
+ eval_str: bool = False,
125
+ format: Literal[Format.STRING],
126
+ ) -> dict[str, str]: ...
127
+ @overload
128
+ def get_annotations(
129
+ obj: Any,
130
+ *,
131
+ globals: dict[str, object] | None = None,
132
+ locals: Mapping[str, object] | None = None,
133
+ eval_str: bool = False,
134
+ format: Literal[Format.FORWARDREF],
135
+ ) -> dict[str, AnnotationForm | ForwardRef]: ...
136
+ @overload
137
+ def get_annotations(
138
+ obj: Any,
139
+ *,
140
+ globals: dict[str, object] | None = None,
141
+ locals: Mapping[str, object] | None = None,
142
+ eval_str: bool = False,
143
+ format: Format = Format.VALUE, # noqa: Y011
144
+ ) -> dict[str, AnnotationForm]: ...
145
+ def type_repr(value: object) -> str: ...
146
+ def annotations_to_string(annotations: SupportsItems[str, object]) -> dict[str, str]: ...