diff --git a/crates/ty_ide/src/inlay_hints.rs b/crates/ty_ide/src/inlay_hints.rs index 147a1ae4b3e54b..7aebe4f2135e86 100644 --- a/crates/ty_ide/src/inlay_hints.rs +++ b/crates/ty_ide/src/inlay_hints.rs @@ -7448,14 +7448,14 @@ mod tests { A = TypeAliasType([name=]'A', [value=]str) --------------------------------------------- info[inlay-hint-location]: Inlay Hint Target - --> stdlib/typing.pyi:2549:26 + --> stdlib/typing.pyi:2561:26 | - 2547 | """ - 2548 | - 2549 | def __new__(cls, name: str, value: Any, *, type_params: tuple[_TypeParameter, ...] = ()) -> Self: ... + 2559 | """ + 2560 | + 2561 | def __new__(cls, name: str, value: Any, *, type_params: tuple[_TypeParameter, ...] = ()) -> Self: ... | ^^^^ - 2550 | @property - 2551 | def __value__(self) -> Any: ... # AnnotationForm + 2562 | @property + 2563 | def __value__(self) -> Any: ... # AnnotationForm | info: Source --> main2.py:3:20 @@ -7466,14 +7466,14 @@ mod tests { | info[inlay-hint-location]: Inlay Hint Target - --> stdlib/typing.pyi:2549:37 + --> stdlib/typing.pyi:2561:37 | - 2547 | """ - 2548 | - 2549 | def __new__(cls, name: str, value: Any, *, type_params: tuple[_TypeParameter, ...] = ()) -> Self: ... + 2559 | """ + 2560 | + 2561 | def __new__(cls, name: str, value: Any, *, type_params: tuple[_TypeParameter, ...] = ()) -> Self: ... | ^^^^^ - 2550 | @property - 2551 | def __value__(self) -> Any: ... # AnnotationForm + 2562 | @property + 2563 | def __value__(self) -> Any: ... # AnnotationForm | info: Source --> main2.py:3:32 diff --git a/crates/ty_vendored/vendor/typeshed/README.md b/crates/ty_vendored/vendor/typeshed/README.md index d295b56bc05df8..4bf78a8300626d 100644 --- a/crates/ty_vendored/vendor/typeshed/README.md +++ b/crates/ty_vendored/vendor/typeshed/README.md @@ -21,7 +21,7 @@ the project the stubs are for, but instead report them here to typeshed.** Further documentation on stub files, typeshed, and Python's typing system in general, can also be found at https://typing.readthedocs.io/en/latest/. -Typeshed supports Python versions 3.9 to 3.14. +Typeshed supports Python versions 3.10 to 3.14. ## Using diff --git a/crates/ty_vendored/vendor/typeshed/source_commit.txt b/crates/ty_vendored/vendor/typeshed/source_commit.txt index cb76aabbb49068..886575caaf814f 100644 --- a/crates/ty_vendored/vendor/typeshed/source_commit.txt +++ b/crates/ty_vendored/vendor/typeshed/source_commit.txt @@ -1 +1 @@ -fa659b1def704dea3dc8e25c7857b23eac69df4d +1b3cec156330a93f6bb22b6636bca38c27f8f721 diff --git a/crates/ty_vendored/vendor/typeshed/stdlib/VERSIONS b/crates/ty_vendored/vendor/typeshed/stdlib/VERSIONS index 6fcf0161790d63..e26bb8da2574e1 100644 --- a/crates/ty_vendored/vendor/typeshed/stdlib/VERSIONS +++ b/crates/ty_vendored/vendor/typeshed/stdlib/VERSIONS @@ -253,6 +253,7 @@ py_compile: 3.0- pyclbr: 3.0- pydoc: 3.0- pydoc_data: 3.0- +pydoc_data.module_docs: 3.13- pyexpat: 3.0- queue: 3.0- quopri: 3.0- diff --git a/crates/ty_vendored/vendor/typeshed/stdlib/_collections_abc.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/_collections_abc.pyi index 0016acdc5549eb..55f176cadf800c 100644 --- a/crates/ty_vendored/vendor/typeshed/stdlib/_collections_abc.pyi +++ b/crates/ty_vendored/vendor/typeshed/stdlib/_collections_abc.pyi @@ -6,7 +6,7 @@ Unit tests are in test_collections. import sys from abc import abstractmethod from types import MappingProxyType -from typing import ( # noqa: Y022,Y038,UP035,Y057 +from typing import ( # noqa: Y022,Y038,UP035,Y057,RUF100 AbstractSet as Set, AsyncGenerator as AsyncGenerator, AsyncIterable as AsyncIterable, diff --git a/crates/ty_vendored/vendor/typeshed/stdlib/_struct.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/_struct.pyi index 801e999a080892..3c7ed69402dc8c 100644 --- a/crates/ty_vendored/vendor/typeshed/stdlib/_struct.pyi +++ b/crates/ty_vendored/vendor/typeshed/stdlib/_struct.pyi @@ -13,9 +13,9 @@ The optional first format char indicates byte order, size and alignment: The remaining chars indicate types of args and must match exactly; these can be preceded by a decimal repeat count: x: pad byte (no data); c:char; b:signed byte; B:unsigned byte; - ?: _Bool (requires C99; if not available, char is used instead) - h:short; H:unsigned short; i:int; I:unsigned int; + ?:_Bool; h:short; H:unsigned short; i:int; I:unsigned int; l:long; L:unsigned long; f:float; d:double; e:half-float. + F:float complex; D:double complex. Special cases (preceding decimal count indicates length): s:string (array of char); p: pascal string (with count byte). Special cases (only available in native format): diff --git a/crates/ty_vendored/vendor/typeshed/stdlib/argparse.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/argparse.pyi index f325b1cb578388..9d38779c6d60c0 100644 --- a/crates/ty_vendored/vendor/typeshed/stdlib/argparse.pyi +++ b/crates/ty_vendored/vendor/typeshed/stdlib/argparse.pyi @@ -454,7 +454,10 @@ class HelpFormatter: def _format_usage( self, usage: str | None, actions: Iterable[Action], groups: Iterable[_MutuallyExclusiveGroup], prefix: str | None ) -> str: ... - def _format_actions_usage(self, actions: Iterable[Action], groups: Iterable[_MutuallyExclusiveGroup]) -> str: ... + if sys.version_info < (3, 14): + # Removed in Python 3.14.3 + def _format_actions_usage(self, actions: Iterable[Action], groups: Iterable[_MutuallyExclusiveGroup]) -> str: ... + def _format_text(self, text: str) -> str: ... def _format_action(self, action: Action) -> str: ... def _format_action_invocation(self, action: Action) -> str: ... diff --git a/crates/ty_vendored/vendor/typeshed/stdlib/ast.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/ast.pyi index b4f5e3d57749b0..5cc6c555b1e7b2 100644 --- a/crates/ty_vendored/vendor/typeshed/stdlib/ast.pyi +++ b/crates/ty_vendored/vendor/typeshed/stdlib/ast.pyi @@ -1679,7 +1679,7 @@ class ExceptHandler(excepthandler): """Return a copy of the AST node with new values for the specified fields.""" class arguments(AST): - """arguments(arg* posonlyargs, arg* args, arg? vararg, arg* kwonlyargs, expr* kw_defaults, arg? kwarg, expr* defaults)""" + """arguments(arg* posonlyargs, arg* args, arg? vararg, arg* kwonlyargs, expr?* kw_defaults, arg? kwarg, expr* defaults)""" if sys.version_info >= (3, 10): __match_args__ = ("posonlyargs", "args", "vararg", "kwonlyargs", "kw_defaults", "kwarg", "defaults") diff --git a/crates/ty_vendored/vendor/typeshed/stdlib/builtins.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/builtins.pyi index d24429fd3f6580..3f648d2f4813d6 100644 --- a/crates/ty_vendored/vendor/typeshed/stdlib/builtins.pyi +++ b/crates/ty_vendored/vendor/typeshed/stdlib/builtins.pyi @@ -49,7 +49,7 @@ from types import CellType, CodeType, GenericAlias, TracebackType # mypy crashes if any of {ByteString, Sequence, MutableSequence, Mapping, MutableMapping} # are imported from collections.abc in builtins.pyi -from typing import ( # noqa: Y022,UP035 +from typing import ( # noqa: Y022,UP035,RUF100 IO, Any, BinaryIO, @@ -3409,7 +3409,7 @@ def ascii(obj: object, /) -> str: to that returned by repr() in Python 2. """ -def bin(number: int | SupportsIndex, /) -> str: +def bin(number: SupportsIndex, /) -> str: """Return the binary representation of an integer. >>> bin(2796202) @@ -3430,7 +3430,7 @@ def callable(obj: object, /) -> TypeIs[Callable[..., object]]: __call__() method. """ -def chr(i: int | SupportsIndex, /) -> str: +def chr(i: SupportsIndex, /) -> str: """Return a Unicode string of one character with ordinal i; 0 <= i <= 0x10ffff.""" if sys.version_info >= (3, 10): @@ -3715,7 +3715,7 @@ def hash(obj: object, /) -> int: help: _sitebuiltins._Helper -def hex(number: int | SupportsIndex, /) -> str: +def hex(number: SupportsIndex, /) -> str: """Return the hexadecimal representation of an integer. >>> hex(12648430) @@ -3967,7 +3967,7 @@ def next(i: SupportsNext[_T], /) -> _T: @overload def next(i: SupportsNext[_T], default: _VT, /) -> _T | _VT: ... -def oct(number: int | SupportsIndex, /) -> str: +def oct(number: SupportsIndex, /) -> str: """Return the octal representation of an integer. >>> oct(342391) diff --git a/crates/ty_vendored/vendor/typeshed/stdlib/email/_header_value_parser.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/email/_header_value_parser.pyi index 1c73357b5388f9..fc64dfa92cdbbb 100644 --- a/crates/ty_vendored/vendor/typeshed/stdlib/email/_header_value_parser.pyi +++ b/crates/ty_vendored/vendor/typeshed/stdlib/email/_header_value_parser.pyi @@ -67,6 +67,7 @@ It is returned in place of lists of (ctext/quoted-pair) and XXX: provide complete list of token types. """ +import sys from collections.abc import Iterable, Iterator from email.errors import HeaderParseError, MessageDefect from email.policy import Policy @@ -96,6 +97,11 @@ def make_quoted_pairs(value: Any) -> str: def quote_string(value: Any) -> str: ... +if sys.version_info >= (3, 13): + # Added in Python 3.13.12, 3.14.3 + def make_parenthesis_pairs(value: Any) -> str: + """Escape parenthesis and backslash for use within a comment.""" + rfc2047_matcher: Final[Pattern[str]] class TokenList(list[TokenList | Terminal]): @@ -384,6 +390,13 @@ class MessageID(MsgID): class InvalidMessageID(MessageID): token_type: str +if sys.version_info >= (3, 13): + # Added in Python 3.13.12, 3.14.3 + class MessageIDList(TokenList): + token_type: str + @property + def message_ids(self) -> list[MsgID | Terminal]: ... + class Header(TokenList): token_type: str @@ -681,6 +694,13 @@ def get_msg_id(value: str) -> tuple[MsgID, str]: def parse_message_id(value: str) -> MessageID: """message-id = "Message-ID:" msg-id CRLF""" +if sys.version_info >= (3, 13): + # Added in Python 3.13.12, 3.14.3 + def parse_message_ids(value: str) -> MessageIDList: + """in-reply-to = "In-Reply-To:" 1*msg-id CRLF + references = "References:" 1*msg-id CRLF + """ + def parse_mime_version(value: str) -> MIMEVersion: """mime-version = [CFWS] 1*digit [CFWS] "." [CFWS] 1*digit [CFWS]""" diff --git a/crates/ty_vendored/vendor/typeshed/stdlib/email/headerregistry.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/email/headerregistry.pyi index c75b8015f7f4ce..0862e6b7383b19 100644 --- a/crates/ty_vendored/vendor/typeshed/stdlib/email/headerregistry.pyi +++ b/crates/ty_vendored/vendor/typeshed/stdlib/email/headerregistry.pyi @@ -4,6 +4,7 @@ This module provides an implementation of the HeaderRegistry API. The implementation is designed to flexibly follow RFC5322 rules. """ +import sys import types from collections.abc import Iterable, Mapping from datetime import datetime as _datetime @@ -248,6 +249,20 @@ class MessageIDHeader: def value_parser(value: str) -> MessageID: """message-id = "Message-ID:" msg-id CRLF""" +if sys.version_info >= (3, 13): + from email._header_value_parser import MessageIDList + + # Added in Python 3.13.12, 3.14.3 + class ReferencesHeader: + max_count: ClassVar[Literal[1]] + @classmethod + def parse(cls, value: str, kwds: dict[str, Any]) -> None: ... + @staticmethod + def value_parser(value: str) -> MessageIDList: + """in-reply-to = "In-Reply-To:" 1*msg-id CRLF + references = "References:" 1*msg-id CRLF + """ + @type_check_only class _HeaderParser(Protocol): max_count: ClassVar[Literal[1] | None] diff --git a/crates/ty_vendored/vendor/typeshed/stdlib/enum.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/enum.pyi index 0a24a1827b3870..5c6a0e42cca4f2 100644 --- a/crates/ty_vendored/vendor/typeshed/stdlib/enum.pyi +++ b/crates/ty_vendored/vendor/typeshed/stdlib/enum.pyi @@ -4,7 +4,7 @@ import types from _typeshed import SupportsKeysAndGetItem, Unused from builtins import property as _builtins_property from collections.abc import Callable, Iterable, Iterator, Mapping -from typing import Any, Final, Generic, Literal, TypeVar, overload +from typing import Any, Final, Generic, Literal, SupportsIndex, TypeVar, overload from typing_extensions import Self, TypeAlias, disjoint_base __all__ = ["EnumMeta", "Enum", "IntEnum", "Flag", "IntFlag", "auto", "unique"] @@ -625,6 +625,17 @@ if sys.version_info >= (3, 11): """ def show_flag_values(value: int) -> list[int]: ... + def bin(num: SupportsIndex, max_bits: int | None = None) -> str: + """ + Like built-in bin(), except negative values are represented in + twos-complement, and the leading bit always indicates sign + (0=positive, 1=negative). + + >>> bin(10) + '0b0 1010' + >>> bin(~10) # ~10 is -11 + '0b1 0101' + """ if sys.version_info >= (3, 12): # The body of the class is the same, but the base classes are different. diff --git a/crates/ty_vendored/vendor/typeshed/stdlib/http/cookies.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/http/cookies.pyi index 8c62c2927d77a2..2c087869f791e3 100644 --- a/crates/ty_vendored/vendor/typeshed/stdlib/http/cookies.pyi +++ b/crates/ty_vendored/vendor/typeshed/stdlib/http/cookies.pyi @@ -49,9 +49,9 @@ within a string. Escaped quotation marks, nested semicolons, and other such trickeries do not confuse it. >>> C = cookies.SimpleCookie() - >>> C.load('keebler="E=everybody; L=\\\\"Loves\\\\"; fudge=\\\\012;";') + >>> C.load('keebler="E=everybody; L=\\\\"Loves\\\\"; fudge=;";') >>> print(C) - Set-Cookie: keebler="E=everybody; L=\\"Loves\\"; fudge=\\012;" + Set-Cookie: keebler="E=everybody; L=\\"Loves\\"; fudge=;" Each element of the Cookie also supports all of the RFC 2109 Cookie attributes. Here's an example which sets the Path diff --git a/crates/ty_vendored/vendor/typeshed/stdlib/inspect.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/inspect.pyi index 0e4d2dc09ccb2c..412861cc417b01 100644 --- a/crates/ty_vendored/vendor/typeshed/stdlib/inspect.pyi +++ b/crates/ty_vendored/vendor/typeshed/stdlib/inspect.pyi @@ -324,6 +324,7 @@ def isgenerator(object: object) -> TypeIs[GeneratorType[Any, Any, Any]]: gi_frame frame object or possibly None once the generator has been exhausted gi_running set to 1 when generator is executing, 0 otherwise + gi_suspended set to 1 when the generator is suspended at a yield point, 0 otherwise gi_yieldfrom object being iterated by yield from or None __iter__() defined to support iteration over container diff --git a/crates/ty_vendored/vendor/typeshed/stdlib/logging/__init__.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/logging/__init__.pyi index a068e6964f4e55..a79718923df1cb 100644 --- a/crates/ty_vendored/vendor/typeshed/stdlib/logging/__init__.pyi +++ b/crates/ty_vendored/vendor/typeshed/stdlib/logging/__init__.pyi @@ -1464,6 +1464,7 @@ class FileHandler(StreamHandler[TextIOWrapper]): encoding: str | None # undocumented delay: bool # undocumented errors: str | None # undocumented + stream: TextIOWrapper | None # type: ignore[assignment] # None when delay=True or after close() def __init__( self, filename: StrPath, mode: str = "a", encoding: str | None = None, delay: bool = False, errors: str | None = None ) -> None: diff --git a/crates/ty_vendored/vendor/typeshed/stdlib/multiprocessing/forkserver.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/multiprocessing/forkserver.pyi index edd3f51e779ebc..a1a0832d31bddf 100644 --- a/crates/ty_vendored/vendor/typeshed/stdlib/multiprocessing/forkserver.pyi +++ b/crates/ty_vendored/vendor/typeshed/stdlib/multiprocessing/forkserver.pyi @@ -38,6 +38,7 @@ class ForkServer: """ if sys.version_info >= (3, 14): + # `sys_argv` parameter added in Python 3.14.3 def main( listener_fd: int | None, alive_r: FileDescriptorLike, @@ -45,10 +46,24 @@ if sys.version_info >= (3, 14): main_path: str | None = None, sys_path: list[str] | None = None, *, + sys_argv: list[str] | None = None, authkey_r: int | None = None, ) -> None: """Run forkserver.""" +elif sys.version_info >= (3, 13): + # `sys_argv` parameter added in Python 3.13.12 + def main( + listener_fd: int | None, + alive_r: FileDescriptorLike, + preload: Sequence[str], + main_path: str | None = None, + sys_path: list[str] | None = None, + *, + sys_argv: list[str] | None = None, + ) -> None: + """Run forkserver.""" + else: def main( listener_fd: int | None, diff --git a/crates/ty_vendored/vendor/typeshed/stdlib/pydoc_data/module_docs.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/pydoc_data/module_docs.pyi new file mode 100644 index 00000000000000..e3f716c0b29254 --- /dev/null +++ b/crates/ty_vendored/vendor/typeshed/stdlib/pydoc_data/module_docs.pyi @@ -0,0 +1,3 @@ +from typing import Final + +module_docs: Final[dict[str, str]] diff --git a/crates/ty_vendored/vendor/typeshed/stdlib/socket.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/socket.pyi index 5880f61729be5e..e4b5daee3681a5 100644 --- a/crates/ty_vendored/vendor/typeshed/stdlib/socket.pyi +++ b/crates/ty_vendored/vendor/typeshed/stdlib/socket.pyi @@ -1590,7 +1590,7 @@ def getfqdn(name: str = "") -> str: if sys.version_info >= (3, 11): def create_connection( - address: tuple[str | None, int], + address: tuple[str | None, bytes | str | int | None], timeout: float | None = ..., source_address: _Address | None = None, *, diff --git a/crates/ty_vendored/vendor/typeshed/stdlib/sqlite3/__init__.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/sqlite3/__init__.pyi index b13cf0c43439ff..b3cfc591cc71ca 100644 --- a/crates/ty_vendored/vendor/typeshed/stdlib/sqlite3/__init__.pyi +++ b/crates/ty_vendored/vendor/typeshed/stdlib/sqlite3/__init__.pyi @@ -428,7 +428,7 @@ class Connection: self, name: str, num_params: int, aggregate_class: Callable[[], _WindowAggregateClass] | None, / ) -> None: ... - def create_collation(self, name: str, callback: Callable[[str, str], int | SupportsIndex] | None, /) -> None: + def create_collation(self, name: str, callback: Callable[[str, str], SupportsIndex] | None, /) -> None: """Creates a collation function.""" def create_function( diff --git a/crates/ty_vendored/vendor/typeshed/stdlib/struct.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/struct.pyi index 9cc366060b83da..22a64e208a6538 100644 --- a/crates/ty_vendored/vendor/typeshed/stdlib/struct.pyi +++ b/crates/ty_vendored/vendor/typeshed/stdlib/struct.pyi @@ -13,9 +13,9 @@ The optional first format char indicates byte order, size and alignment: The remaining chars indicate types of args and must match exactly; these can be preceded by a decimal repeat count: x: pad byte (no data); c:char; b:signed byte; B:unsigned byte; - ?: _Bool (requires C99; if not available, char is used instead) - h:short; H:unsigned short; i:int; I:unsigned int; + ?:_Bool; h:short; H:unsigned short; i:int; I:unsigned int; l:long; L:unsigned long; f:float; d:double; e:half-float. + F:float complex; D:double complex. Special cases (preceding decimal count indicates length): s:string (array of char); p: pascal string (with count byte). Special cases (only available in native format): diff --git a/crates/ty_vendored/vendor/typeshed/stdlib/tarfile.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/tarfile.pyi index 4ec6fcfa6879bb..f926b98c51806f 100644 --- a/crates/ty_vendored/vendor/typeshed/stdlib/tarfile.pyi +++ b/crates/ty_vendored/vendor/typeshed/stdlib/tarfile.pyi @@ -123,16 +123,16 @@ class TarFile: OPEN_METH: ClassVar[Mapping[str, str]] name: StrOrBytesPath | None mode: Literal["r", "a", "w", "x"] - fileobj: _Fileobj | None - format: _TarFormat | None + fileobj: _Fileobj + format: _TarFormat tarinfo: type[TarInfo] - dereference: bool | None - ignore_zeros: bool | None - encoding: str | None + dereference: bool + ignore_zeros: bool + encoding: str errors: str fileobject: type[ExFileObject] # undocumented pax_headers: Mapping[str, str] - debug: int | None + debug: int errorlevel: int offset: int # undocumented extraction_filter: _FilterFunction | None diff --git a/crates/ty_vendored/vendor/typeshed/stdlib/tkinter/__init__.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/tkinter/__init__.pyi index a6dbb6a35726c4..7718e654143dbe 100644 --- a/crates/ty_vendored/vendor/typeshed/stdlib/tkinter/__init__.pyi +++ b/crates/ty_vendored/vendor/typeshed/stdlib/tkinter/__init__.pyi @@ -1367,9 +1367,9 @@ class Misc: def pack_propagate(self, flag: bool) -> bool | None: """Set or get the status for propagation of geometry information. - A boolean argument specifies whether the geometry information - of the slaves will determine the size of this widget. If no argument - is given the current setting will be returned. + A boolean argument specifies whether the size of this container will + be determined by the geometry information of its content. + If no argument is given the current setting will be returned. """ @overload @@ -1377,7 +1377,7 @@ class Misc: propagate = pack_propagate def grid_anchor(self, anchor: Literal["nw", "n", "ne", "w", "center", "e", "sw", "s", "se"] | None = None) -> None: """The anchor value controls how to place the grid within the - master when no row/column has any weight. + container widget when no row/column has any weight. The default anchor is nw. """ @@ -1395,7 +1395,7 @@ class Misc: starts at that cell. The returned integers specify the offset of the upper left - corner in the master widget and the width and height. + corner in the container widget and the width and height. """ @overload @@ -1440,7 +1440,7 @@ class Misc: rowconfigure = grid_rowconfigure def grid_location(self, x: float | str, y: float | str) -> tuple[int, int]: """Return a tuple of column and row which identify the cell - at which the pixel at position X and Y inside the master + at which the pixel at position X and Y inside the container widget is located. """ @@ -1448,9 +1448,9 @@ class Misc: def grid_propagate(self, flag: bool) -> None: """Set or get the status for propagation of geometry information. - A boolean argument specifies whether the geometry information - of the slaves will determine the size of this widget. If no argument - is given, the current setting will be returned. + A boolean argument specifies whether the size of this container will + be determined by the geometry information of its content. + If no argument is given the current setting will be returned. """ @overload @@ -1460,18 +1460,22 @@ class Misc: size = grid_size # Widget because Toplevel or Tk is never a slave def pack_slaves(self) -> list[Widget]: - """Return a list of all slaves of this widget - in its packing order. + """Returns a list of all of the content widgets in the packing order + for this container. """ def grid_slaves(self, row: int | None = None, column: int | None = None) -> list[Widget]: - """Return a list of all slaves of this widget - in its packing order. + """Returns a list of the content widgets. + + If no arguments are supplied, a list of all of the content in this + container widget is returned, most recently managed first. + If ROW or COLUMN is specified, only the content in the row or + column is returned. """ def place_slaves(self) -> list[Widget]: - """Return a list of all slaves of this widget - in its packing order. + """Returns a list of all the content widgets for which this widget is + the container. """ slaves = pack_slaves def event_add(self, virtual: str, *sequences: str) -> None: @@ -2389,8 +2393,8 @@ class Pack: before=widget - pack it before you will pack widget expand=bool - expand widget if parent size grows fill=NONE or X or Y or BOTH - fill widget if widget grows - in=master - use master to contain this widget - in_=master - see 'in' option description + in=container - use the container widget to contain this widget + in_=container - see 'in' option description ipadx=amount - add internal padding in x direction ipady=amount - add internal padding in y direction padx=amount - add padding in x direction @@ -2447,25 +2451,31 @@ class Place: **kw: Any, # allow keyword argument named 'in', see #4836 ) -> None: """Place a widget in the parent widget. Use as options: - in=master - master relative to which the widget is placed - in_=master - see 'in' option description - x=amount - locate anchor of this widget at position x of master - y=amount - locate anchor of this widget at position y of master + in=container - the container widget relative to which this widget is + placed + in_=container - see 'in' option description + x=amount - locate anchor of this widget at position x of the + container widget + y=amount - locate anchor of this widget at position y of the + container widget relx=amount - locate anchor of this widget between 0.0 and 1.0 - relative to width of master (1.0 is right edge) + relative to width of the container widget (1.0 is + right edge) rely=amount - locate anchor of this widget between 0.0 and 1.0 - relative to height of master (1.0 is bottom edge) - anchor=NSEW (or subset) - position anchor according to given direction + relative to height of the container widget (1.0 is + bottom edge) + anchor=NSEW (or subset) - position anchor according to given + direction width=amount - width of this widget in pixel height=amount - height of this widget in pixel relwidth=amount - width of this widget between 0.0 and 1.0 - relative to width of master (1.0 is the same width - as the master) + relative to width of the container widget (1.0 is + the same width as the container widget) relheight=amount - height of this widget between 0.0 and 1.0 - relative to height of master (1.0 is the same - height as the master) + relative to height of the container widget (1.0 + is the same height as the container widget) bordermode="inside" or "outside" - whether to take border width of - master widget into account + the container widget into account """ def place_forget(self) -> None: @@ -2515,8 +2525,8 @@ class Grid: """Position a widget in the parent widget in a grid. Use as options: column=number - use cell identified with given column (starting with 0) columnspan=number - this widget will span several columns - in=master - use master to contain this widget - in_=master - see 'in' option description + in=container - use the container widget to contain this widget + in_=container - see 'in' option description ipadx=amount - add internal padding in x direction ipady=amount - add internal padding in y direction padx=amount - add padding in x direction diff --git a/crates/ty_vendored/vendor/typeshed/stdlib/typing.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/typing.pyi index 64141483c64c87..d3948fb35e80c5 100644 --- a/crates/ty_vendored/vendor/typeshed/stdlib/typing.pyi +++ b/crates/ty_vendored/vendor/typeshed/stdlib/typing.pyi @@ -840,13 +840,13 @@ if sys.version_info >= (3, 10): to a callable accepting two positional-only arguments of types int and str: - type IntFuncDefault[**P = (int, str)] = Callable[P, int] + type IntFuncDefault[**P = [int, str]] = Callable[P, int] For compatibility with Python 3.11 and earlier, ParamSpec objects can also be created as follows:: P = ParamSpec('P') - DefaultP = ParamSpec('DefaultP', default=(int, str)) + DefaultP = ParamSpec('DefaultP', default=[int, str]) Parameter specification variables exist primarily for the benefit of static type checkers. They are used to forward the parameter types of @@ -1176,31 +1176,31 @@ class _Alias: def __getitem__(self, typeargs: Any) -> Any: ... List = _Alias() -"""A generic version of list.""" +"""Deprecated alias to list.""" Dict = _Alias() -"""A generic version of dict.""" +"""Deprecated alias to dict.""" DefaultDict = _Alias() -"""A generic version of collections.defaultdict.""" +"""Deprecated alias to collections.defaultdict.""" Set = _Alias() -"""A generic version of set.""" +"""Deprecated alias to set.""" FrozenSet = _Alias() -"""A generic version of frozenset.""" +"""Deprecated alias to frozenset.""" Counter = _Alias() -"""A generic version of collections.Counter.""" +"""Deprecated alias to collections.Counter.""" Deque = _Alias() -"""A generic version of collections.deque.""" +"""Deprecated alias to collections.deque.""" ChainMap = _Alias() -"""A generic version of collections.ChainMap.""" +"""Deprecated alias to collections.ChainMap.""" OrderedDict = _Alias() -"""A generic version of collections.OrderedDict.""" +"""Deprecated alias to collections.OrderedDict.""" Annotated: _SpecialForm """Add context-specific metadata to a type. @@ -1674,6 +1674,14 @@ class AbstractSet(Collection[_T_co]): by the built-in frozenset type. """ # Mixin methods + @classmethod + def _from_iterable(cls, it: Iterable[_S]) -> AbstractSet[_S]: + """Construct an instance of the class from any iterable input. + + Must override this method if the class constructor signature + does not accept an iterable for an input. + """ + def __le__(self, other: AbstractSet[Any]) -> bool: ... def __lt__(self, other: AbstractSet[Any]) -> bool: ... def __gt__(self, other: AbstractSet[Any]) -> bool: ... @@ -1727,6 +1735,8 @@ class MappingView(Sized): class ItemsView(MappingView, AbstractSet[tuple[_KT_co, _VT_co]], Generic[_KT_co, _VT_co]): def __init__(self, mapping: SupportsGetItemViewable[_KT_co, _VT_co]) -> None: ... # undocumented + @classmethod + def _from_iterable(cls, it: Iterable[_S]) -> set[_S]: ... def __and__(self, other: Iterable[Any]) -> set[tuple[_KT_co, _VT_co]]: ... def __rand__(self, other: Iterable[_T]) -> set[_T]: ... def __contains__(self, item: tuple[object, object]) -> bool: ... # type: ignore[override] @@ -1740,6 +1750,8 @@ class ItemsView(MappingView, AbstractSet[tuple[_KT_co, _VT_co]], Generic[_KT_co, class KeysView(MappingView, AbstractSet[_KT_co]): def __init__(self, mapping: Viewable[_KT_co]) -> None: ... # undocumented + @classmethod + def _from_iterable(cls, it: Iterable[_S]) -> set[_S]: ... def __and__(self, other: Iterable[Any]) -> set[_KT_co]: ... def __rand__(self, other: Iterable[_T]) -> set[_T]: ... def __contains__(self, key: object) -> bool: ... diff --git a/crates/ty_vendored/vendor/typeshed/stdlib/typing_extensions.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/typing_extensions.pyi index 1dee1f396c480b..7d49e80a31f09a 100644 --- a/crates/ty_vendored/vendor/typeshed/stdlib/typing_extensions.pyi +++ b/crates/ty_vendored/vendor/typeshed/stdlib/typing_extensions.pyi @@ -30,7 +30,7 @@ from collections.abc import ( from contextlib import AbstractAsyncContextManager as AsyncContextManager, AbstractContextManager as ContextManager from re import Match as Match, Pattern as Pattern from types import GenericAlias, ModuleType -from typing import ( # noqa: Y022,Y037,Y038,Y039,UP035 +from typing import ( # noqa: Y022,Y037,Y038,Y039,UP035,RUF100 IO as IO, TYPE_CHECKING as TYPE_CHECKING, AbstractSet as AbstractSet, @@ -401,7 +401,7 @@ class _TypedDict(Mapping[str, object], metaclass=abc.ABCMeta): def __ior__(self, value: Self, /) -> Self: ... # type: ignore[misc] OrderedDict = _Alias() -"""A generic version of collections.OrderedDict.""" +"""Deprecated alias to collections.OrderedDict.""" if sys.version_info >= (3, 13): from typing import get_type_hints as get_type_hints