Features and fixes - #202
Merged
Merged
Conversation
Contributor
by ecosystem round-tripbase: regressions: 3, changed: 1336, improvements: 0, error changes: 2 (across 26070 files in 148 projects) ❌ regressions (built on base, now fails)pandas-stubs —schemathesis —setuptools —ℹ️ changed round-trip outputDateType — _by_sourcemap.py--- base/_by_sourcemap.py
+++ head/_by_sourcemap.py
@@ -3,7 +3,7 @@
SOURCEMAP = {
"/tmp/tmpte41zgtb/DateType/out/docs/conf.py": ("/tmp/tmpte41zgtb/DateType/docs/conf.by", [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56]),
... 8425 characters elided ...
}Expression — _by_sourcemap.py--- base/_by_sourcemap.py
+++ head/_by_sourcemap.py
@@ -2,5 +2,5 @@
# the two tables share their keys: the generated path, spelled as it is here
SOURCEMAP = {
... 120557 characters elided ...
"/tmp/tmpzbf0_s_h/Expression/out/tests/test_typing.py": {"by": "sha256:33d144f167ae03063c197ffe387dc020323e963f41ad5e594414e18f555983b5", "py": "sha256:9c51d48084519692f70b0ac9e38c7e45efeec8774630e572ca57ff9ced4a9497"},Expression — expression/collections/array.py--- base/expression/collections/array.py
+++ head/expression/collections/array.py
@@ -303,5 +303,5 @@
def array_from_initializer(
initializer: Iterable[Any] | None = None,
-) -> tuple[_Array[dynamic], TypeCode]:
+) -> tuple[_Array[Any], TypeCode]:
# Use list as the default array
arr: _Array[Any] = list(initializer if initializer else [])Expression — expression/collections/map.py--- base/expression/collections/map.py
+++ head/expression/collections/map.py
@@ -240,5 +240,5 @@
other = _soundness_check(cast(Map[Any, Any], o), Map)
- iterator: Iterator[tuple[dynamic, dynamic]] = iter(other.to_seq())
+ iterator: Iterator[tuple[Any, Any]] = iter(other.to_seq())
for kv in _soundness_iter(self.to_seq(), tuple):Expression — expression/collections/seq.py--- base/expression/collections/seq.py
+++ head/expression/collections/seq.py
@@ -925,5 +925,5 @@
"""
- def mapper_(args: tuple[dynamic, ...]) -> Any:
+ def mapper_(args: tuple[Any, ...]) -> Any:
return mapper(*args)Expression — expression/core/curry.py--- base/expression/core/curry.py
+++ head/expression/core/curry.py
@@ -17,5 +17,5 @@
-def _curry(args: tuple[dynamic, ...], arity: int, fun: Callable[..., Any]) -> Callable[..., Any]:
+def _curry(args: tuple[Any, ...], arity: int, fun: Callable[..., Any]) -> Callable[..., Any]:
def wrapper(*args_: Any, **kw: Any) -> Any:
if arity == 1:Expression — expression/core/misc.py--- base/expression/core/misc.py
+++ head/expression/core/misc.py
@@ -37,5 +37,5 @@
-def snd(value: tuple[dynamic, _TSource]) -> _TSource:
+def snd(value: tuple[Any, _TSource]) -> _TSource:
"""Return second argument of the tuple."""
_, b = value
@@ -43,5 +43,5 @@
-def fst(value: tuple[_TSource, dynamic]) -> _TSource:
+def fst(value: tuple[_TSource, Any]) -> _TSource:
"""Return first argument of the tuple."""
a, _ = valueExpression — expression/core/typing.py--- base/expression/core/typing.py
+++ head/expression/core/typing.py
@@ -56,5 +56,5 @@
sub_fields: list[ModelField]
- def validate(self, value: Any, values: dict[str, str], loc: str) -> tuple[dynamic, dynamic]: ...
+ def validate(self, value: Any, values: dict[str, str], loc: str) -> tuple[Any, Any]: ...Expression — expression/extra/parser.py(only produced on head)Expression — tests/test_tagged_union.py--- base/tests/test_tagged_union.py
+++ head/tests/test_tagged_union.py
@@ -30,6 +30,6 @@
circle: Circle = _soundness_check(case(), Circle)
- rectangle: tuple[float, float] = _soundness_check(case(), tuple)
- triangle: tuple[float, float] = _soundness_check(case(), tuple)
+ rectangle: tuple[JustFloat, JustFloat] = _soundness_check(case(), tuple)
+ triangle: tuple[JustFloat, JustFloat] = _soundness_check(case(), tuple)PyGithub — _by_sourcemap.py--- base/_by_sourcemap.py
+++ head/_by_sourcemap.py
@@ -3,187 +3,187 @@
SOURCEMAP = {
... 629692 characters elided ...
"/tmp/tmpyy7qd2fx/PyGithub/out/tests/Gist.py": {"by": "sha256:54a50b19f06155889febb34dd30039e96587118eb278c9389d25b3f02339cd67", "py": "sha256:9319ce481c3124aff3ec5fcdfdee7e4b8511d91a2a5c924bd189829572cbd802"},PyGithub — github/ApplicationOAuth.py--- base/github/ApplicationOAuth.py
+++ head/github/ApplicationOAuth.py
@@ -193,5 +193,5 @@
@staticmethod
- def _checkError(headers: dict[str, Any], data: Any) -> tuple[dict[str, dynamic], dynamic]:
+ def _checkError(headers: dict[str, Any], data: Any) -> tuple[dict[str, Any], Any]:
if isinstance(data, dict) and "error" in data:
if data["error"] == "bad_verification_code":PyGithub — github/GitReleaseAsset.py--- base/github/GitReleaseAsset.py
+++ head/github/GitReleaseAsset.py
@@ -176,5 +176,5 @@
return True
- def download_asset(self, path: None = None, chunk_size: int | None = 1) -> tuple[int, dict[str, dynamic], Iterator]:
+ def download_asset(self, path: None = None, chunk_size: int | None = 1) -> tuple[int, dict[str, Any], Iterator]:
...PyGithub — github/NamedUser.py--- base/github/NamedUser.py
+++ head/github/NamedUser.py
@@ -468,5 +468,5 @@
since = NotSet
assert since is NotSet or isinstance(since, datetime), since
- url_parameters = dict()
+ url_parameters = dict[str, str]()
if _soundness_check(is_defined(since), bool):
url_parameters["since"] = since.strftime("%Y-%m-%dT%H:%M:%SZ")PyGithub — github/Repository.py--- base/github/Repository.py
+++ head/github/Repository.py
@@ -2625,5 +2625,5 @@
if path == "/":
path = ""
- url_parameters = dict()
+ url_parameters = dict[str, str]()
if _soundness_check(is_defined(ref), bool):
url_parameters["ref"] = ref
@@ -2875,5 +2875,5 @@
per = NotSet
assert per in ["day", "week", NotSet], "per must be day or week, day by default"
- url_parameters = dict()
+ url_parameters = dict[str, str]()
if _soundness_check(is_defined(per), bool):
url_parameters["per"] = per
@@ -3320,5 +3320,5 @@
assert is_optional(recursive, bool), recursive
sha = urllib.parse.quote(sha, safe="")
- url_parameters = dict()
+ url_parameters = dict[str, int]()
if _soundness_check(is_defined(recursive), bool) and recursive:
# GitHub API requires the recursive parameter be set to 1.
@@ -3792,5 +3792,5 @@
ref = NotSet
assert is_optional(ref, str), ref
- url_parameters = dict()
+ url_parameters = dict[str, str]()
... 117 characters elided ...
event = urllib.parse.quote(event, safe="")
- post_parameters = collections.OrderedDict()
+ post_parameters = collections.OrderedDict[str, str]()
post_parameters["hub.callback"] = callback
post_parameters["hub.topic"] = f"https://github.com/{self.full_name}/events/{event}"PyGithub — github/Requester.py--- base/github/Requester.py
+++ head/github/Requester.py
@@ -655,5 +655,5 @@
input: Any | None = None,
follow_302_redirect: bool = False,
- ) -> tuple[dict[str, dynamic], dynamic]:
+ ) -> tuple[dict[str, Any], Any]:
"""\
Send a request with JSON body.
@@ -688,5 +688,5 @@
headers: dict[str, Any] | None = None,
input: dict[str, str] | None = None,
- ) -> tuple[dict[str, dynamic], dict[str, dynamic] | None]:
+ ) -> tuple[dict[str, Any], dict[str, dynamic] | None]:
"""\
Send a request with multi-part-encoded body.
@@ -712,5 +712,5 @@
input: str | None = None,
cnx: HTTPRequestsConnectionClass | HTTPSRequestsConnectionClass | None = None,
- ) -> tuple[dict[str, dynamic], dict[str, dynamic]]:
+ ) -> tuple[dict[str, Any], dict[str, Any]]:
"""\
Send a request with a file for the body.
@@ -743,5 +743,5 @@
return klass(self, headers, data)
- def graphql_query(self, query: str, variables: dict[str, Any]) -> tuple[dict[str, dynamic], dict[str, dynamic]]:
... 3786 characters elided ...
if parameters is None:
@@ -1276,5 +1276,5 @@
stream: bool = False,
follow_302_redirect: bool = False,
- ) -> tuple[int, dict[str, dynamic], str | object]:
+ ) -> tuple[int, dict[str, Any], str | object]:
self.__deferRequest(verb)PyGithub — scripts/fix_headers.py--- base/scripts/fix_headers.py
+++ head/scripts/fix_headers.py
@@ -79,5 +79,5 @@
def listContributors(filename):
- contributors = set()
+ contributors = set[tuple[str, str]]()
result = subprocess.check_output(
["git", "log", "--follow", "--format=format:%ad %an <%ae>", "--date=short", "--", filename],
@@ -119,5 +119,5 @@
newLines.append("#!/usr/bin/env python")
- for line in generateLicenseSection(filename):
+ for line in _soundness_iter(generateLicenseSection(filename), str):
newLines.append(line)
@@ -137,5 +137,5 @@
newLines = []
- for line in generateLicenseSection(filename):
+ for line in _soundness_iter(generateLicenseSection(filename), str):
newLines.append(line)
@@ -189,5 +189,5 @@
print(" => actually modifying", filename)
with open(filename, "w", encoding="utf-8") as f:
- for line in newLines:
+ for line in _soundness_iter(newLines, str):
_soundness_check(f.write(line + "\n"), int)PyGithub — scripts/openapi.py--- base/scripts/openapi.py
+++ head/scripts/openapi.py
@@ -4110,5 +4110,5 @@
available_schemas = {}
schema_returned_by = defaultdict(set)
- unimplemented_schemas = set()
+ unimplemented_schemas = set[str]()
for cls in self.classes.values():
schemas: list[str] = _soundness_check(cls.get("schemas", []), list)
@@ -4159,5 +4159,5 @@
_soundness_check(available_schemas[cls_name], dict)[key].append(st)
- for schema in _soundness_check(sorted(list(unimplemented_schemas)), list):
+ for schema in _soundness_iter(_soundness_check(sorted(list[str](unimplemented_schemas)), list), str):
print(f"schema not implemented: {schema}")
@@ -4281,7 +4281,7 @@
paths[verb] = set()
paths[verb] = _soundness_check(_soundness_check(paths[verb], set).union(available_paths.keys()), set)
- available = _soundness_check(available.union({a for s in available_paths.values() for a in s}), set)
-
... 791 characters elided ...
+ methods = methods.union(path_to_call_methods.get(path, {}).get(verb, set()))
if methods:
print(" Methods returning the schema:")PyGithub — tests/ExposeAllAttributes.py--- base/tests/ExposeAllAttributes.py
+++ head/tests/ExposeAllAttributes.py
@@ -6,4 +6,8 @@
)
return _v
+
+def _soundness_iter(_it, _t):
+ for _x in _it:
+ yield _soundness_check(_x, _t)
############################ Copyrights and license ############################
@@ -152,5 +156,5 @@
print(className, attrName, "->", repr(value))
- self.assertEqual(_soundness_check(sum(len(attrs) for attrs in missingAttributes.values()), int), 0)
+ self.assertEqual(_soundness_check(sum(len(attrs) for attrs in _soundness_iter(missingAttributes.values(), dict)), int), 0)
def findMissingAttributes(self, obj):PyWinCtl — _by_sourcemap.py--- base/_by_sourcemap.py
+++ head/_by_sourcemap.py
@@ -3,6 +3,6 @@
SOURCEMAP = {
"/tmp/tmppxusce98/PyWinCtl/out/pywinctl/__init__.py": ("/tmp/tmppxusce98/PyWinCtl/src/pywinctl/__init__.by", [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26]),
... 39243 characters elided ...
"/tmp/tmppxusce98/PyWinCtl/out/typings/AppKit.pyi": ("/tmp/tmppxusce98/PyWinCtl/typings/AppKit.byi", [None, None, 0, 1, 2, 3, 4, 5, 6, 7, 7, 8, 9, 10, 11, 12, 12, 13, 14, 15, 16, 17, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49]),Tanjun — _by_sourcemap.py--- base/_by_sourcemap.py
+++ head/_by_sourcemap.py
@@ -3,18 +3,18 @@
SOURCEMAP = {
"/tmp/tmph4i4zt_o/Tanjun/out/examples/__init__.py": ("/tmp/tmph4i4zt_o/Tanjun/examples/__init__.by", [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]),
- "/tmp/tmph4i4zt_o/Tanjun/out/examples/checks.py": ("/tmp/tmph4i4zt_o/Tanjun/examples/checks.by", [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, None, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 48, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97]),
... 571729 characters elided ...
"/tmp/tmph4i4zt_o/Tanjun/out/tests/test_hooks.py": {"by": "sha256:e7004968c03a3b35467fe0a34a5041afb82aa2b76fffafd88241ce7c18f65fe5", "py": "sha256:4b25211f2eb90ece48944f782be62c71a9ab9bf1d9b73b1e75e6b64be1c6c3eb"},Tanjun — tanjun/abc.py--- base/tanjun/abc.py
+++ head/tanjun/abc.py
@@ -3712,5 +3712,5 @@
def check_message_name(
self, name: str, /, *, case_sensitive: bool = True
- ) -> collections.Iterator[tuple[str, MessageCommand[dynamic]]]:
+ ) -> collections.Iterator[tuple[str, MessageCommand[Any]]]:
"""Check whether a name matches any of this component's registered message commands.
@@ -4740,5 +4740,5 @@
def check_message_name(
self, name: str, /, *, case_sensitive: bool = True
- ) -> collections.Iterator[tuple[str, MessageCommand[dynamic]]]:
+ ) -> collections.Iterator[tuple[str, MessageCommand[Any]]]:
"""Check whether a message command name is present in the current client.Tanjun — tanjun/annotations.py(only produced on head)Tanjun — tanjun/commands/slash.py--- base/tanjun/commands/slash.py
+++ head/tanjun/commands/slash.py
@@ -1780,5 +1780,5 @@
channel_types: collections.Sequence[int] | None = None,
choices: (
- collections.Mapping[str, str | int | float] | collections.Sequence[tuple[str, str | int | float]] | collections.Sequence[hikari.CommandChoice] | None
+ collections.Mapping[str, str | int | JustFloat] | collections.Sequence[tuple[str, str | int | JustFloat]] | collections.Sequence[hikari.CommandChoice] | None
) = None,
converters: collections.Sequence[_AnyConverterSig] | _AnyConverterSig = _MISSING,
@@ -2381,5 +2381,5 @@
always_float: bool = True,
autocomplete: tanjun.AutocompleteSig[JustFloat] | None = None,
- choices: collections.Sequence[tuple[str, float]],
+ choices: collections.Sequence[tuple[str, JustFloat]],
converters: collections.Sequence[ConverterSig[JustFloat]] | ConverterSig[JustFloat] = _MISSING,
default: Any = _MISSING,
@@ -2405,5 +2405,5 @@
autocomplete: tanjun.AutocompleteSig[JustFloat] | None = None,
choices: (
... 140 characters elided ...
+ collections.Mapping[str, JustFloat] | collections.Sequence[tuple[str, JustFloat]] | collections.Sequence[hikari.CommandChoice] | None
) = None,
converters: collections.Sequence[ConverterSig[JustFloat]] | ConverterSig[JustFloat] = _MISSING,Tanjun — tanjun/context/slash.py--- base/tanjun/context/slash.py
+++ head/tanjun/context/slash.py
@@ -1176,5 +1176,5 @@
-_ATTACHMENT_TYPES: tuple[type[dynamic], ...] = (hikari.files.Resource, *hikari.files.RAWISH_TYPES, os.PathLike)
+_ATTACHMENT_TYPES: tuple[type[Any], ...] = (hikari.files.Resource, *hikari.files.RAWISH_TYPES, os.PathLike)Tanjun — tanjun/conversion.py--- base/tanjun/conversion.py
+++ head/tanjun/conversion.py
@@ -148,5 +148,5 @@
@property
- def caches(self) -> collections.Sequence[tuple[dynamic, hikari.api.CacheComponents, hikari.Intents]]:
+ def caches(self) -> collections.Sequence[tuple[Any, hikari.api.CacheComponents, hikari.Intents]]:
"""Caches the converter takes advantage of.
@@ -313,7 +313,7 @@
@property
- def caches(self) -> collections.Sequence[tuple[dynamic, hikari.api.CacheComponents, hikari.Intents]]:
+ def caches(self) -> collections.Sequence[tuple[Any, hikari.api.CacheComponents, hikari.Intents]]:
# <<inherited docstring from BaseConverter>>.
- results: list[tuple[dynamic, hikari.api.CacheComponents, hikari.Intents]] = []
+ results: list[tuple[Any, hikari.api.CacheComponents, hikari.Intents]] = []
if self._guilds_enabled:
@@ -432,5 +432,5 @@
@property
- def caches(self) -> collections.Sequence[tuple[dynamic, hikari.api.CacheComponents, hikari.Intents]]:
+ def caches(self) -> collections.Sequence[tuple[Any, hikari.api.CacheComponents, hikari.Intents]]:
... 3093 characters elided ...
@@ -953,5 +953,5 @@
@property
- def caches(self) -> collections.Sequence[tuple[dynamic, hikari.api.CacheComponents, hikari.Intents]]:
+ def caches(self) -> collections.Sequence[tuple[Any, hikari.api.CacheComponents, hikari.Intents]]:
# <<inherited docstring from BaseConverter>>.
return [Tanjun — tanjun/parsing.py--- base/tanjun/parsing.py
+++ head/tanjun/parsing.py
@@ -29,5 +29,5 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"""Standard implementation of message command argument parsing."""
-lazy from typing import Any, Callable
+lazy from typing import Any, Callable, Literal
_MISSING = object()
def _soundness_check(_v, _t):
@@ -548,5 +548,5 @@
return _soundness_check(value[1], tuple) if value else None
- def __seek_shlex(self) -> tuple[0, str] | tuple[1, tuple[str, str | None]] | None:
+ def __seek_shlex(self) -> tuple[Literal[0], str] | tuple[Literal[1], tuple[str, str | None]] | None:
option_name = self.__last_nameTanjun — tests/test_conversion.py--- base/tests/test_conversion.py
+++ head/tests/test_conversion.py
@@ -1,2 +1,3 @@
+lazy from typing import Any
# BSD 3-Clause License
#
@@ -172,5 +173,5 @@
self,
obj: tanjun.conversion.BaseConverter,
- expected: list[tuple[dynamic, hikari.api.CacheComponents, hikari.Intents]],
+ expected: list[tuple[Any, hikari.api.CacheComponents, hikari.Intents]],
) -> None:
assert obj.caches == expected
@@ -295,5 +296,5 @@
allowed_types: list[hikari.ChannelType],
include_dms: bool,
- expected: list[tuple[dynamic, hikari.api.CacheComponents, hikari.Intents]],
+ expected: list[tuple[Any, hikari.api.CacheComponents, hikari.Intents]],
) -> None:
assert tanjun.conversion.ToChannel(allowed_types=allowed_types, include_dms=include_dms).caches == expectedaiohttp — _by_sourcemap.py--- base/_by_sourcemap.py
+++ head/_by_sourcemap.py
@@ -3,53 +3,54 @@
SOURCEMAP = {
... 844712 characters elided ...
"/tmp/tmpcwnjusas/aiohttp/out/tests/test_websocket_data_queue.py": {"by": "sha256:b65eeea1e883345017ffc690d7a36cfe5c55bd61cc5886648e74a595a16af14b", "py": "sha256:84434a074ed2bdacb028ad6d5e74e7ee432dba717c7396b9f413e1e8457fa64a"},aiohttp — aiohttp/client_exceptions.py--- base/aiohttp/client_exceptions.py
+++ head/aiohttp/client_exceptions.py
@@ -336,5 +336,5 @@
ssl_error_bases = (ClientSSLError, ssl.SSLError)
else: # pragma: no cover
- cert_errors = tuple[()]() # type: ignore[unreachable]
+ cert_errors = tuple() # type: ignore[unreachable]
cert_errors_bases = (
ClientSSLError,
@@ -342,5 +342,5 @@
)
- ssl_errors = tuple[()]()
+ ssl_errors = tuple()
ssl_error_bases = (ClientSSLError,)aiohttp — aiohttp/client_middleware_digest_auth.py--- base/aiohttp/client_middleware_digest_auth.py
+++ head/aiohttp/client_middleware_digest_auth.py
@@ -86,5 +86,5 @@
# RFC 7616: Challenge parameters to extract
-CHALLENGE_FIELDS: Final[tuple["realm" | "nonce" | "qop" | "algorithm" | "opaque" | "domain" | "stale", ...]] = (
+CHALLENGE_FIELDS: Final[tuple[Literal["realm", "nonce", "qop", "algorithm", "opaque", "domain", "stale"], ...]] = (
"realm",
"nonce",aiohttp — aiohttp/connector.py--- base/aiohttp/connector.py
+++ head/aiohttp/connector.py
@@ -546,5 +546,5 @@
# We use a deque to store connections because it has O(1) popleft()
# and O(1) append() operations to implement a FIFO queue.
- self._conns: defaultdict[ConnectionKey, deque[tuple[ResponseHandler, float]]] = defaultdict[ConnectionKey, deque[tuple[ResponseHandler, int | float]]](deque)
+ self._conns: defaultdict[ConnectionKey, deque[tuple[ResponseHandler, JustFloat]]] = defaultdict[ConnectionKey, deque[tuple[ResponseHandler, int | float]]](deque)
self._limit = limit
self._limit_per_host = limit_per_host
@@ -659,8 +659,8 @@
if self._conns:
- connections = defaultdict(deque)
+ connections = defaultdict[ConnectionKey, deque[tuple[ResponseHandler, int | float]]](deque)
deadline = now - timeout
for key, conns in self._conns.items():
- alive: deque[tuple[ResponseHandler, float]] = deque[tuple[ResponseHandler, int | float]]()
... 342 characters elided ...
self._addrs_rr: OrderedDict[tuple[str, int], tuple[Iterator[ResolveResult], int]] = OrderedDict()
- self._timestamps: dict[tuple[str, int], float] = {}
+ self._timestamps: dict[tuple[str, int], JustFloat] = {}
self._ttl = ttl
self._max_size = max_sizeaiohttp — aiohttp/cookiejar.py--- base/aiohttp/cookiejar.py
+++ head/aiohttp/cookiejar.py
@@ -295,6 +295,6 @@
}
)
- self._expire_heap: list[tuple[float, tuple[str, str, str]]] = []
- self._expirations: dict[tuple[str, str, str], float] = {}
+ self._expire_heap: list[tuple[JustFloat, tuple[str, str, str]]] = []
+ self._expirations: dict[tuple[str, str, str], JustFloat] = {}
@propertyaiohttp — aiohttp/helpers.py(only produced on head)aiohttp — aiohttp/test_utils.py--- base/aiohttp/test_utils.py
+++ head/aiohttp/test_utils.py
@@ -398,5 +398,5 @@
async def _make_runner(self, **kwargs: Any) -> ServerRunner:
# TODO(PY311): Use Unpack to specify Server kwargs.
- srv = Server(self._handler, **kwargs)
+ srv = Server[BaseRequest](self._handler, **kwargs)
return ServerRunner(srv, **kwargs)aiohttp — aiohttp/web_app.py--- base/aiohttp/web_app.py
+++ head/aiohttp/web_app.py
@@ -69,5 +69,5 @@
def _build_middlewares(
- handler: Handler, apps: tuple["Application", ...]
+ handler: Handler, apps: tuple[Literal["Application"], ...]
) -> Callable[[Request], Awaitable[StreamResponse]]:
"""Apply middlewares to handler."""aiohttp — aiohttp/web_exceptions.py--- base/aiohttp/web_exceptions.py
+++ head/aiohttp/web_exceptions.py
@@ -174,5 +174,5 @@
__reduce__ = object.__reduce__
- def __getnewargs__(self) -> tuple[dynamic, ...]:
+ def __getnewargs__(self) -> tuple[Any, ...]:
return self.argsaiohttp — aiohttp/web_log.py--- base/aiohttp/web_log.py
+++ head/aiohttp/web_log.py
@@ -123,5 +123,5 @@
# list of (key, method) tuples, we don't use an OrderedDict as users
# can repeat the same key more than once
- methods = list()
+ methods = list[KeyMethod]()
for atom in _soundness_iter(_soundness_check(self.FORMAT_RE.findall(log_format), list), tuple):
@@ -224,5 +224,5 @@
fmt_info = self._format_line(request, response, time)
- values = list()
+ values = list[str]()
extra: dict[str, str | dict[str, str]] = dict[str, str | dict[str, str]]()
for key, value in fmt_info:aiohttp — aiohttp/web_urldispatcher.py--- base/aiohttp/web_urldispatcher.py
+++ head/aiohttp/web_urldispatcher.py
@@ -421,5 +421,5 @@
@property
- def apps(self) -> tuple["Application", ...]:
+ def apps(self) -> tuple[Literal["Application"], ...]:
return tuple(self._apps)aiohttp — aiohttp/web_ws.py--- base/aiohttp/web_ws.py
+++ head/aiohttp/web_ws.py
@@ -1,4 +1,4 @@
lazy from ty_extensions import JustFloat
-lazy from typing import Any, Callable, overload
+lazy from typing import Any, Callable, Literal, overload
_MISSING = object()
def _soundness_check(_v, _t):
@@ -299,5 +299,5 @@
def _handshake(
self, request: BaseRequest
- ) -> tuple["CIMultiDict[str]", str | None, int, bool]:
+ ) -> tuple[Literal["CIMultiDict[str]"], str | None, int, bool]:
headers = request.headers
if "websocket" != headers.get(hdrs.UPGRADE, "").lower().strip():aiohttp — tests/test_client_ws_functional.py--- base/tests/test_client_ws_functional.py
+++ head/tests/test_client_ws_functional.py
@@ -313,5 +313,5 @@
async def handler(request: web.Request) -> web.WebSocketResponse:
- ws = web.WebSocketResponse[bool]()
+ ws = web.WebSocketResponse()
await ws.prepare(request)
@@ -899,5 +899,5 @@
async def handler(request: web.Request) -> NoReturn:
nonlocal ping_received
- ws = web.WebSocketResponse[bool](autoping=False)
+ ws = web.WebSocketResponse(autoping=False)
await ws.prepare(request)
msg = await ws.receive()
@@ -960,5 +960,5 @@
async def handler(request: web.Request) -> NoReturn:
nonlocal ping_received
- ws = web.WebSocketResponse[bool](autoping=False)
+ ws = web.WebSocketResponse(autoping=False)
await ws.prepare(request)
msg = await ws.receive()
@@ -1059,5 +1059,5 @@
async def handler(request: web.Request) -> NoReturn:
nonlocal ping_received
- ws = web.WebSocketResponse[bool](autoping=False)
+ ws = web.WebSocketResponse(autoping=False)
... 350 characters elided ...
@@ -1130,5 +1130,5 @@
async def handler(request: web.Request) -> NoReturn:
nonlocal ping_received
- ws = web.WebSocketResponse[bool](autoping=False)
+ ws = web.WebSocketResponse(autoping=False)
with mock.patch(
"aiohttp.web_ws.WebSocketDataQueue", PatchableWebSocketDataQueueaiohttp — tests/test_connector.py--- base/tests/test_connector.py
+++ head/tests/test_connector.py
@@ -2051,5 +2051,5 @@
trace_config_ctx = mock.Mock()
on_signal = mock.AsyncMock(side_effect=asyncio.CancelledError)
- trace_config = aiohttp.TraceConfig(
+ trace_config = aiohttp.TraceConfig[object](
trace_config_ctx_factory=mock.Mock(return_value=trace_config_ctx)
)
@@ -2253,5 +2253,5 @@
m1.is_connected.return_value = True
m2.is_connected.return_value = False
- testset: defaultdict[ConnectionKey, deque[tuple[ResponseHandler, float]]] = (
+ testset: defaultdict[ConnectionKey, deque[tuple[ResponseHandler, JustFloat]]] = (
defaultdict[ConnectionKey, deque[tuple[ResponseHandler, int | float]]](deque)
)
@@ -2278,5 +2278,5 @@
proto = create_mocked_conn(asyncio.get_running_loop())
transport = proto.transport
- testset: defaultdict[ConnectionKey, deque[tuple[ResponseHandler, float]]] = (
+ testset: defaultdict[ConnectionKey, deque[tuple[ResponseHandler, JustFloat]]] = (
defaultdict[ConnectionKey, deque[tuple[ResponseHandler, int | float]]](deque)
)
... 413 characters elided ...
m.is_connected.return_value = True
- testset: defaultdict[ConnectionKey, deque[tuple[ResponseHandler, float]]] = (
+ testset: defaultdict[ConnectionKey, deque[tuple[ResponseHandler, JustFloat]]] = (
defaultdict[ConnectionKey, deque[tuple[ResponseHandler, int | float]]](deque)
)aiohttp — tests/test_cookiejar.py--- base/tests/test_cookiejar.py
+++ head/tests/test_cookiejar.py
@@ -630,5 +630,5 @@
def request_reply_with_same_url(
self, url: str
- ) -> tuple["BaseCookie[str]", SimpleCookie]:
+ ) -> tuple[Literal["BaseCookie[str]"], SimpleCookie]:
jar = CookieJar()
jar.update_cookies(self.cookies_to_send)aiohttp — tests/test_run_app.py--- base/tests/test_run_app.py
+++ head/tests/test_run_app.py
@@ -1,4 +1,4 @@
lazy from ty_extensions import JustFloat
-lazy from typing import Any, Callable
+lazy from typing import Any, Callable, Literal
def _soundness_check(_v, _t):
if not isinstance(_v, _t):
@@ -255,5 +255,5 @@
]
mock_socket = mock.Mock(getsockname=lambda: ("mock-socket", 123))
-mixed_bindings_tests: tuple[tuple[str, dict[str, dynamic], list[mock._Call], list[mock._Call]], ...] = (
+mixed_bindings_tests: tuple[tuple[str, dict[str, Any], list[mock._Call], list[mock._Call]], ...] = (
(
"Nothing Specified",
@@ -1170,5 +1170,5 @@
task: Callable[[], Coroutine[None, None, None]],
extra_test: Callable[[ClientSession], Awaitable[None]] | None = None,
- ) -> tuple["asyncio.Task[None]", int]:
+ ) -> tuple[Literal["asyncio.Task[None]"], int]:
num_connections = -1
t = test_task = None
@@ -1454,5 +1454,5 @@
async def ws_handler(request: web.Request) -> web.WebSocketResponse:
- ws = web.WebSocketResponse[bool]()
+ ws = web.WebSocketResponse()
await ws.prepare(request)
request.app[WS].add(ws)aiohttp — tests/test_tracing.py--- base/tests/test_tracing.py
+++ head/tests/test_tracing.py
@@ -139,5 +139,5 @@
callback = mock.AsyncMock()
- trace_config = TraceConfig()
+ trace_config = TraceConfig[object]()
getattr(trace_config, "on_%s" % signal).append(callback)
trace_config.freeze()aiohttp — tests/test_web_functional.py--- base/tests/test_web_functional.py
+++ head/tests/test_web_functional.py
@@ -2598,5 +2598,5 @@
def deleted_file_fds() -> set[tuple[str, str]]:
"""(fd, symlink target) pairs for open fds backed by deleted files."""
- fds = set()
+ fds = set[tuple[str, str]]()
for name in _soundness_iter(os.listdir("/proc/self/fd"), str):
try:aiohttp — tests/test_web_websocket.py--- base/tests/test_web_websocket.py
+++ head/tests/test_web_websocket.py
@@ -199,5 +199,5 @@
async def test_nonstarted_send_json_bytes() -> None:
- ws = web.WebSocketResponse[bool]()
+ ws = web.WebSocketResponse()
with pytest.raises(RuntimeError):
await ws.send_json_bytes(
@@ -208,5 +208,5 @@
async def test_send_json_bytes_nonjson(make_request: _RequestMaker) -> None:
req = make_request("GET", "/")
- ws = web.WebSocketResponse[bool]()
+ ws = web.WebSocketResponse()
await ws.prepare(req)
with pytest.raises(TypeError):aiohttp-devtools — _by_sourcemap.py--- base/_by_sourcemap.py
+++ head/_by_sourcemap.py
@@ -4,12 +4,12 @@
"/tmp/tmp8tvrbhuz/aiohttp-devtools/out/aiohttp_devtools/__init__.py": ("/tmp/tmp8tvrbhuz/aiohttp-devtools/aiohttp_devtools/__init__.by", [0]),
"/tmp/tmp8tvrbhuz/aiohttp-devtools/out/aiohttp_devtools/__main__.py": ("/tmp/tmp8tvrbhuz/aiohttp-devtools/aiohttp_devtools/__main__.by", [0, 1, 2, 3]),
- "/tmp/tmp8tvrbhuz/aiohttp-devtools/out/aiohttp_devtools/cli.py": ("/tmp/tmp8tvrbhuz/aiohttp-devtools/aiohttp_devtools/cli.by", [None, None, None, None, None, None, None, None, None, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 41, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 94, 94, 94, 94, 94, 94, 94, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114]),
... 19037 characters elided ...aioredis — _by_sourcemap.py--- base/_by_sourcemap.py
+++ head/_by_sourcemap.py
@@ -3,12 +3,12 @@
SOURCEMAP = {
"/tmp/tmpiazj7vsb/aioredis/out/aioredis/__init__.py": ("/tmp/tmpiazj7vsb/aioredis/aioredis/__init__.by", [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58]),
... 147593 characters elided ...
"/tmp/tmpiazj7vsb/aioredis/out/aioredis/connection.py": {"by": "sha256:ae10a0dafd9c3b88ce20c41f6968205a7a6922e0f0603a3b93a400eb96f7a574", "py": "sha256:d54c46d327a47e9bb43cdf4c9a8e4deea47faac6207a20c87dd6df95b9dc771f"},aioredis — aioredis/client.py--- base/aioredis/client.py
+++ head/aioredis/client.py
@@ -170,5 +170,5 @@
response = str_if_bytes(response)
response = "type:" + response
- response = dict(kv.split(":") for kv in response.split())
+ response = dict[str, int](kv.split(":") for kv in response.split())
# parse some expected int values from the string responseaiortc — _by_sourcemap.py--- base/_by_sourcemap.py
+++ head/_by_sourcemap.py
@@ -7,7 +7,7 @@
"/tmp/tmpte41zgtb/aiortc/out/examples/datachannel-vpn/tuntap.py": ("/tmp/tmpte41zgtb/aiortc/examples/datachannel-vpn/tuntap.by", [None, None, None, None, None, None, None, None, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95]),
... 281745 characters elided ...
"/tmp/tmpte41zgtb/aiortc/out/aiortc/stats.py": {"by": "sha256:ecf4b08892429483f28d5c426fc985c0d6ce9794532e9f20e76388fc5ca18768", "py": "sha256:261406f3b313b77097d4c88a17a61e6cd8da721570d07a7de36377d0082c6c30"},aiortc — aiortc/rtcdtlstransport.py--- base/aiortc/rtcdtlstransport.py
+++ head/aiortc/rtcdtlstransport.py
@@ -691,5 +691,5 @@
self, receiver: RtpReceiver, parameters: RTCRtpReceiveParameters
) -> None:
- ssrcs = set()
+ ssrcs = set[int]()
for encoding in parameters.encodings:
ssrcs.add(encoding.ssrc)
@@ -698,5 +698,5 @@
self._rtp_router.register_receiver(
receiver,
- ssrcs=list(ssrcs),
+ ssrcs=list[int](ssrcs),
payload_types=[codec.payloadType for codec in parameters.codecs],
mid=parameters.muxId,aiortc — aiortc/rtp.py--- base/aiortc/rtp.py
+++ head/aiortc/rtp.py
@@ -411,5 +411,5 @@
class RtcpSourceInfo:
ssrc: int
- items: list[tuple[dynamic, bytes]]
+ items: list[tuple[Any, bytes]]alectryon — _by_sourcemap.py--- base/_by_sourcemap.py
+++ head/_by_sourcemap.py
@@ -4,36 +4,36 @@
"/tmp/tmpzbf0_s_h/alectryon/out/alectryon/__init__.py": ("/tmp/tmpzbf0_s_h/alectryon/alectryon/__init__.by", [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28]),
"/tmp/tmpzbf0_s_h/alectryon/out/alectryon/__main__.py": ("/tmp/tmpzbf0_s_h/alectryon/alectryon/__main__.by", [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21]),
... 107448 characters elided ...
"/tmp/tmpzbf0_s_h/alectryon/out/alectryon/vsrocq.py": {"by": "sha256:ad44445e5d3150ebd045a87094218cfb2751cf25bbe28b8b2c2ae12dc144a1a8", "py": "sha256:b396f0799949b048e7bc13a78de3d43c1c6bb4ef76b4fd23d4a5892614a304f1"},alectryon — alectryon/core.py--- base/alectryon/core.py
+++ head/alectryon/core.py
@@ -830,5 +830,5 @@
def _recover_chunks(cls, chunks: Iterable[str],
fragments: Iterable[Union[Sentence, Text]]):
- frs = deque[Positioned[Sentence | Text]](cls.with_boundaries(fragments))
+ frs = deque(cls.with_boundaries(fragments))
for chunk in _soundness_iter_p(cls.with_boundaries(chunks), Positioned[str], (1,)):
chunk_frs = []
@@ -836,11 +836,11 @@
assert frs[0].beg >= chunk.beg
while frs and frs[0].end <= chunk.end:
- chunk_frs.append(_soundness_parametric(frs.popleft(), Positioned[Sentence | Text], (1,)).e)
+ chunk_frs.append(frs.popleft().e)
if frs and frs[0].beg < chunk.end < frs[0].end:
cutoff = chunk.end - frs[0].beg
before, after = cls.split_fragment(frs[0].e, cutoff)
- frs[0] = _soundness_parametric(replace(frs[0], beg=chunk.end, e=after), Positioned[Sentence | Text], (1,))
+ frs[0] = replace(frs[0], beg=chunk.end, e=after)
chunk_frs.append(before)
- assert chunk.e == chunk.e[0:0].join(c.contents for c in _soundness_iter(chunk_frs, (Sentence, Text)))
+ assert chunk.e == chunk.e[0:0].join(c.contents for c in _soundness_iter(chunk_frs, (Text, Sentence)))
yield chunk_frs
assert not frsalectryon — alectryon/docutils.py--- base/alectryon/docutils.py
+++ head/alectryon/docutils.py
@@ -1575,5 +1575,5 @@
"""A transformer that only applies transforms below a certain threshold."""
PRIORITY_THRESHOLD: str = "700-000"
- transforms: list[tuple[str, type[docutils.transforms.Transform], dynamic, dict[str, dynamic]]]
+ transforms: list[tuple[str, type[docutils.transforms.Transform], Any, dict[str, Any]]]
def apply_transforms(self):alectryon — alectryon/transforms.py--- base/alectryon/transforms.py
+++ head/alectryon/transforms.py
@@ -605,6 +605,6 @@
predicate = lambda _: True
from .literate import partition, StringView, Code, Comment
- grouped = list[Text | RichSentence](enrich_sentences(fragments))
- for idx, fr in enumerate[Text | RichSentence](grouped):
+ grouped = list[Text | RichSentence | None](enrich_sentences(fragments))
+ for idx, fr in enumerate[Text | RichSentence | None](grouped):
prev = grouped[idx - 1] if idx > 0 else None
prev_is_sentence = isinstance(prev, RichSentence)
@@ -889,6 +889,6 @@
of the hover bubbles.
"""
- grouped = list(fragments)
- for idx, fr in enumerate(grouped):
+ grouped = list[Text | None](fragments)
+ for idx, fr in enumerate[Text | None](grouped):
if isinstance(fr, Text) and idx > 0:
m = LEAN_COMMA_RE.match(fr.contents)altair — _by_sourcemap.py--- base/_by_sourcemap.py
+++ head/_by_sourcemap.py
@@ -2,7 +2,7 @@
# the two tables share their keys: the generated path, spelled as it is here
SOURCEMAP = {
... 29511 characters elided ...
}antidote — _by_sourcemap.py--- base/_by_sourcemap.py
+++ head/_by_sourcemap.py
@@ -2,59 +2,60 @@
# the two tables share their keys: the generated path, spelled as it is here
SOURCEMAP = {
... 134633 characters elided ...
"/tmp/tmph4i4zt_o/antidote/out/antidote/lib/interface_ext/qualifier.py": {"by": "sha256:83774ddda41d0d44383c99ea6cd68a40b72cb303b64976bbbcc3f80bfcfe36f4", "py": "sha256:e611cc56ee0a54e4d918080161bca055f0187e0d21f361717c7df8fe470c3182"},antidote — antidote/_internal/utils.py--- base/antidote/_internal/utils.py
+++ head/antidote/_internal/utils.py
@@ -98,5 +98,5 @@
def debug_repr_call(
- func: Callable[..., object], args: tuple[dynamic, ...], kwargs: dict[str, Any]
+ func: Callable[..., object], args: tuple[Any, ...], kwargs: dict[str, Any]
) -> str:
out = [f"{debug_repr(func)}("]
@@ -228,4 +228,4 @@
# For speed and space efficiency
-EMPTY_TUPLE: tuple[dynamic, ...] = ()
+EMPTY_TUPLE: tuple[Any, ...] = ()
EMPTY_DICT: dict[str, Any] = {}antidote — antidote/core/__init__.py--- base/antidote/core/__init__.py
+++ head/antidote/core/__init__.py
@@ -787,5 +787,5 @@
...
- def update(self, _: Mapping[dynamic, object] | Iterable[tuple[object, object]]) -> None:
+ def update(self, _: Mapping[Any, object] | Iterable[tuple[object, object]]) -> None:
...antidote — antidote/lib/injectable_ext/_provider.py(only produced on head)antidote — antidote/lib/interface_ext/_function.py--- base/antidote/lib/interface_ext/_function.py
+++ head/antidote/lib/interface_ext/_function.py
@@ -178,5 +178,5 @@
__slots__ = ("query", "args", "kwargs", "catalog_id")
query: ImplementationQuery[LazyFunction[..., Out]]
- args: tuple[dynamic, ...]
+ args: tuple[Any, ...]
kwargs: dict[str, Any]
catalog_id: CatalogId
@@ -210,5 +210,5 @@
__slots__ = ("query", "args", "kwargs", "catalog_id")
query: ImplementationQuery[Sequence[LazyFunction[..., Out]]]
- args: tuple[dynamic, ...]
+ args: tuple[Any, ...]
kwargs: dict[str, Any]
catalog_id: CatalogIdantidote — antidote/lib/interface_ext/_provider.py--- base/antidote/lib/interface_ext/_provider.py
+++ head/antidote/lib/interface_ext/_provider.py
@@ -185,5 +185,5 @@
catalog: ProviderCatalog
lock: threading.RLock
- candidates_ordered_asc: tuple[CandidateImplementation[dynamic]]
+ candidates_ordered_asc: tuple[CandidateImplementation[Any]]
default_implementation: Implementation | None
@@ -192,5 +192,5 @@
*,
catalog: ProviderCatalog,
- candidates_ordered_asc: tuple[CandidateImplementation[dynamic]] = _MISSING,
+ candidates_ordered_asc: tuple[CandidateImplementation[Any]] = _MISSING,
default_implementation: Implementation | None = None,
lock: threading.RLock | None = None,
@@ -289,5 +289,5 @@
pos = bisect.bisect_right(candidates, candidate)
- if pos > 0 and not (_soundness_check(candidates[pos - 1], CandidateImplementation) < candidate):
+ if pos > 0 and not (candidates[pos - 1] < candidate):
candidate = _soundness_check(dataclasses.replace(candidate, same_weight_as_left=True), CandidateImplementation)
candidates.insert(pos, candidate)anyio — _by_sourcemap.py--- base/_by_sourcemap.py
+++ head/_by_sourcemap.py
@@ -7,37 +7,37 @@
"/tmp/tmpcwnjusas/anyio/out/anyio/_core/__init__.py": ("/tmp/tmpcwnjusas/anyio/src/anyio/_core/__init__.by", []),
"/tmp/tmpcwnjusas/anyio/out/anyio/_core/_asyncio_selector_thread.py": ("/tmp/tmpcwnjusas/anyio/src/anyio/_core/_asyncio_selector_thread.by", [None, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164]),
... 251402 characters elided ...
"/tmp/tmpcwnjusas/anyio/out/tests/test_futures.py": {"by": "sha256:af1b33fe440c7fc9ab8735b012ebf96ad799a2587b51e9c36d5f669dd2437b32", "py": "sha256:25b8bb76c888b6ea9c5b2d292cadba68af73e2a136abfad364706ba5a0fe111d"},anyio — anyio/_core/_concurrency_utils.py--- base/anyio/_core/_concurrency_utils.py
+++ head/anyio/_core/_concurrency_utils.py
@@ -90,5 +90,5 @@
-async def gather(*coros: Coroutine[Any, Any, Any]) -> tuple[dynamic, ...]:
+async def gather(*coros: Coroutine[Any, Any, Any]) -> tuple[Any, ...]:
"""\
Run coroutines concurrently in a task group. The order of result values correspondsanyio — anyio/from_thread.py--- base/anyio/from_thread.py
+++ head/anyio/from_thread.py
@@ -555,5 +555,5 @@
*args: object,
name: object = None,
- ) -> tuple[Future[T_Retval], dynamic]:
+ ) -> tuple[Future[T_Retval], Any]:
"""\
Start a task in the portal's task group and wait until it signals for readiness.anyio — anyio/functools.py--- base/anyio/functools.py
+++ head/anyio/functools.py
@@ -42,5 +42,5 @@
S = TypeVar("S")
P = ParamSpec("P")
-lru_cache_items: RunVar[WeakKeyDictionary[AsyncLRUCacheWrapper[dynamic, dynamic], OrderedDict[Hashable, tuple[_InitialMissingType, Lock, float | None] | tuple[dynamic, None, float | None]]]] = RunVar("lru_cache_items")
+lru_cache_items: RunVar[WeakKeyDictionary[AsyncLRUCacheWrapper[Any, Any], OrderedDict[Hashable, tuple[_InitialMissingType, Lock, float | None] | tuple[Any, None, float | None]]]] = RunVar("lru_cache_items")
@@ -134,5 +134,5 @@
# The key is constructed as a flat tuple to avoid memory overhead
- key: tuple[dynamic, ...] = args
+ key: tuple[Any, ...] = args
if kwargs:
# initial_missing is used as a separatoranyio — anyio/pytest_plugin.py--- base/anyio/pytest_plugin.py
+++ head/anyio/pytest_plugin.py
@@ -57,5 +57,5 @@
-def extract_backend_and_options(backend: object) -> tuple[str, dict[str, dynamic]]:
+def extract_backend_and_options(backend: object) -> tuple[str, dict[str, Any]]:
if isinstance(backend, str):
return backend, {}
@@ -254,5 +254,5 @@
fi = item._fixtureinfo
- new_names_closure = list(fi.names_closure)
+ new_names_closure = list[str](fi.names_closure)
if "anyio_backend" not in new_names_closure:
new_names_closure.append("anyio_backend")anyio — anyio/to_process.py--- base/anyio/to_process.py
+++ head/anyio/to_process.py
@@ -1,2 +1,3 @@
+lazy from ty_extensions import JustFloat
lazy from typing import Callable
def _by_type_param_defaults(args):
@@ -213,5 +214,5 @@
_process_pool_workers: RunVar[set[Process]] = RunVar[set[Process]]("_process_pool_workers")
-_process_pool_idle_workers: RunVar[deque[tuple[Process, float]]] = RunVar[deque[tuple[Process, int | float]]](
+_process_pool_idle_workers: RunVar[deque[tuple[Process, JustFloat]]] = RunVar[deque[tuple[Process, int | float]]](
"_process_pool_idle_workers"
)anyio — tests/conftest.py--- base/tests/conftest.py
+++ head/tests/conftest.py
@@ -144,5 +144,5 @@
@pytest.fixture(params=backend_params)
-def anyio_backend(request: SubRequest) -> tuple[str, dict[str, dynamic]]:
+def anyio_backend(request: SubRequest) -> tuple[str, dict[str, Any]]:
return request.paramanyio — tests/test_from_thread.py--- base/tests/test_from_thread.py
+++ head/tests/test_from_thread.py
@@ -368,5 +368,5 @@
def test_run_sync_from_thread_pooling(self) -> None:
async def main() -> None:
- thread_ids = set()
+ thread_ids = set[int]()
for _ in range(5):
thread_ids.add(await to_thread.run_sync(threading.get_ident))
@@ -374,5 +374,5 @@
# Expects that all the work has been done in the same worker thread
assert len(thread_ids) == 1
- assert thread_ids.pop() != threading.get_ident()
+ assert _soundness_check(thread_ids.pop(), int) != threading.get_ident()
assert threading.active_count() == initial_count + 1archinstall — _by_sourcemap.py--- base/_by_sourcemap.py
+++ head/_by_sourcemap.py
@@ -36,5 +36,5 @@
"/tmp/tmpiazj7vsb/archinstall/out/archinstall/default_profiles/desktops/xmonad.py": ("/tmp/tmpiazj7vsb/archinstall/archinstall/default_profiles/desktops/xmonad.by", [None, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 25, 26]),
"/tmp/tmpiazj7vsb/archinstall/out/archinstall/default_profiles/minimal.py": ("/tmp/tmpiazj7vsb/archinstall/archinstall/default_profiles/minimal.by", [0, 1, 2, 3, 4, 5, 6, 7, 8]),
... 210084 characters elided ...
"/tmp/tmpiazj7vsb/archinstall/out/archinstall/tui/result.py": {"by": "sha256:6b45a33a6cce06c7f22fe0be3d1eea71ed62b25f7ad0271f41fb57f17b35ddfd", "py": "sha256:6857f322beaef78a4717735fd43634e983c15916ee2505d72147c6b060266735"},archinstall — archinstall/lib/global_menu.py--- base/archinstall/lib/global_menu.py
+++ head/archinstall/lib/global_menu.py
@@ -224,5 +224,5 @@
return item.has_value()
- missing = set()
+ missing = set[str]()
if (auth_config is None or auth_config.root_enc_password is None) and not (auth_config and auth_config.has_superuser()):archinstall — archinstall/tui/components.py--- base/archinstall/tui/components.py
+++ head/archinstall/tui/components.py
@@ -1127,5 +1127,5 @@
continue
- row_values = list(item.value.table_data().values())
+ row_values = list[str](item.value.table_data().values())
if self._multi:artigraph — _by_sourcemap.py--- base/_by_sourcemap.py
+++ head/_by_sourcemap.py
@@ -5,6 +5,6 @@
"/tmp/tmpte41zgtb/artigraph/out/arti/__init__.py": ("/tmp/tmpte41zgtb/artigraph/src/arti/__init__.by", [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74]),
"/tmp/tmpte41zgtb/artigraph/out/arti/annotations/__init__.py": ("/tmp/tmpte41zgtb/artigraph/src/arti/annotations/__init__.by", [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]),
... 58565 characters elided ...
"/tmp/tmpte41zgtb/artigraph/out/tests/arti/storage/test_literal_storage.py": {"by": "sha256:55f291fb6be55aa31db7466f7f54958ef38fc01fe2b90fa09bd71953900f0f8a", "py": "sha256:b61ba9b99e066177d59541914a73d64092b9a6628c7bcc0799d1be8b28a16959"},artigraph — arti/internal/dispatch.py--- base/arti/internal/dispatch.py
+++ head/arti/internal/dispatch.py
@@ -44,5 +44,5 @@
self.clean_signature = tidy_signature(func, self.signature)
- def __missing__(self, types: tuple[dynamic, ...]) -> Callable[..., RETURN]:
+ def __missing__(self, types: tuple[Any, ...]) -> Callable[..., RETURN]:
if self.discovery_func is not None:
self.discovery_func()artigraph — arti/storage/_internal.py--- base/arti/storage/_internal.py
+++ head/arti/storage/_internal.py
@@ -106,5 +106,5 @@
placeholder_type: Callable[[str], Placeholder],
/,
- *args: Iterable[tuple[str, dynamic]],
+ *args: Iterable[tuple[str, Any]],
**kwargs: Any,
) -> None:artigraph — tests/arti/dummies.py(only produced on head)artigraph — tests/arti/graphs/test_graph.py(only produced on head)artigraph — tests/arti/producers/test_producer.py(only produced on head)arviz — _by_sourcemap.py--- base/_by_sourcemap.py
+++ head/_by_sourcemap.py
@@ -7,5 +7,5 @@
"/tmp/tmpzbf0_s_h/arviz/out/arviz/__init__.py": ("/tmp/tmpzbf0_s_h/arviz/src/arviz/__init__.by", [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, None, None, None, None, None, None, None, None, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121]),
"/tmp/tmpzbf0_s_h/arviz/out/tests/__init__.py": ("/tmp/tmpzbf0_s_h/arviz/tests/__init__.by", [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]),
... 2559 characters elided ...
"/tmp/tmpzbf0_s_h/arviz/out/tests/test_namespace.py": {"by": "sha256:7a363871e8e6c244c1589288bf7e93c8f3b34b917d50076e430764b280e3e140", "py": "sha256:a4eb08320a496de8c132dc81abdfea4d676d2235da47d90c52ec0b70dfd008ad"},arviz — arviz/__init__.py--- base/arviz/__init__.py
+++ head/arviz/__init__.py
@@ -94,6 +94,6 @@
matches = _soundness_check(pat.findall(info), list)
-versions = dict[str, str](_soundness_check(pat.findall(info), list))
-unique_versions = set[str](versions.values())
+versions = dict(_soundness_check(pat.findall(info), list))
+unique_versions = set(versions.values())
if len(unique_versions) > 1:async-utils — _by_sourcemap.py--- base/_by_sourcemap.py
+++ head/_by_sourcemap.py
@@ -18,5 +18,5 @@
"/tmp/tmpyy7qd2fx/async-utils/out/async_utils/ratelimiter.py": ("/tmp/tmpyy7qd2fx/async-utils/src/async_utils/ratelimiter.by", [None, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80]),
... 5682 characters elided ...
"/tmp/tmpyy7qd2fx/async-utils/out/async_utils/scheduler.py": {"by": "sha256:39b0f99defd3a74715c4c2134d44607279c4d6de88d00a66ef598233ca89e649", "py": "sha256:a22219824b9d27cd4beae4fe3a3893ea31d902acd34652442d7d6d568b33e6b9"},async-utils — async_utils/lru.py--- base/async_utils/lru.py
+++ head/async_utils/lru.py
@@ -239,8 +239,8 @@
def __init__(self, maxsize: int, ttl: JustFloat) -> None:
- self._cache: dict[K, tuple[float, V]] = {}
+ self._cache: dict[K, tuple[JustFloat, V]] = {}
self._maxsize: int = maxsize
self._ttl: JustFloat = ttl
- self._expirations: list[tuple[float, K]] = []
+ self._expirations: list[tuple[JustFloat, K]] = []
self._smooth: int = _soundness_check(max(int(math.log2(maxsize // 2)), 1), int)
self._internal_lock: threading.RLock = threading.RLock()async-utils — async_utils/priority_sem.py--- base/async_utils/priority_sem.py
+++ head/async_utils/priority_sem.py
@@ -58,5 +58,5 @@
def __init__(self, priority: int, ts: JustFloat, future: cf.Future[None], /) -> None:
self.future: cf.Future[None] = future
- self.ord: tuple[int, float] = (priority, ts)
+ self.ord: tuple[int, JustFloat] = (priority, ts)
def cancelled(self) -> bool:asynq — asynq/async_task.py--- base/asynq/async_task.py
+++ head/asynq/async_task.py
@@ -488,5 +488,5 @@
# Private part
-_empty_tuple = tuple[()]()
+_empty_tuple = tuple()
_empty_dictionary = dict()
globals()["_empty_tuple"] = _empty_tupleattrs — attr/_make.py(only produced on head)black — black/__init__.py--- base/black/__init__.py
+++ head/black/__init__.py
@@ -1268,5 +1268,5 @@
d = color_diff(d)
f = wrap_stream_for_windows(f)
- f.write(d)
+ _soundness_check(f.write(d), int)
f.detach()1272 finding(s) omitted to fit GitHub's 65536-character comment limit. Every finding, with nothing elided, is in the |
KotlinIsland
force-pushed
the
features-and-fixes
branch
from
September 6, 2026 22:45
ebddf67 to
4483c4e
Compare
Contributor
ecosystem checkLinter (stable)✅ ecosystem check detected no linter changes. Linter (preview)✅ ecosystem check detected no linter changes. Formatter (stable)✅ ecosystem check detected no format changes. Formatter (preview)✅ ecosystem check detected no format changes. |
KotlinIsland
force-pushed
the
features-and-fixes
branch
from
September 6, 2026 23:01
4483c4e to
218daad
Compare
…ate constructor Co-Authored-By: Claude Opus 5 <[email protected]>
…an unconstrained class type parameter Co-Authored-By: Claude Opus 5 <[email protected]>
…like every other type expression Co-Authored-By: Claude Opus 5 <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
the pep 695 polyfill splices the source text of a bound or default into the
`TypeVar(...)` call it emits, but every type parameter is renamed on the way
out (`T` -> `_T`). a bound or default that names another type parameter
therefore reached the output holding a name nothing defines, and the emitted
module raised `NameError` on import, because a legacy `TypeVar` evaluates both
arguments eagerly:
_T = TypeVar("_T")
_R = TypeVar("_R", bound=T)
this was already broken for defaults: `def g[T, R = T]` is valid pep 696 that
the checker accepts today.
the rename map now covers the enclosing type-parameter lists as well as the
current one, so a method's bound can name its class's parameter. the runtime
test executes the polyfilled module, because a text assertion on the lowered
output cannot see an import that raises.
Co-Authored-By: Claude Opus 5 <[email protected]>
`def f[T, R: T]` is pep 695's own rule — a bound may name a type parameter already in scope, either an earlier entry in the same list or, for a method, an entry in its class's list. the checker reported `invalid-type-variable-bound` and then discarded the bound, so `r` had no members and every pair of arguments was accepted. the scope rule is decided in one place, `bound_scope_violation_for`, which both the diagnostic and `lazy_bound` consult. a bound that breaks it is still dropped, not merely reported: several consumers reduce a type variable to its bound by plain recursion, so the mutually recursive bounds of `def f[T: R, R: T]` would overflow the stack rather than produce an error. a nested class or nested function is rejected for the same reason its bound cannot work — nothing substitutes the enclosing parameter, so the generic would fail a bound it could never satisfy at every use. a bound naming another type parameter is a relation between two variables, and the constraint set already represents one, so it is conjoined there as a validity bound rather than measured as a concrete ceiling. inference is therefore bound-informed, as in java and typescript: `pick(Dog(), Animal())` widens `T` rather than failing, which is the only reading that also solves `def f[T, R: T](r: R) -> T`, where nothing else mentions `T`. every path that treats a declared bound as a concrete type leaves a generic one alone, an explicit specialization substitutes the arguments already chosen into it, and an unsatisfiable relation is reported against the argument that caused it once both variables are solved. where there is no specialization to consult, a bound is read at whichever end of each named parameter makes it widest, so a declaration is faulted only for what nothing could rescue. a bound range gets a second reading as well: `def f[T: str, R: T..int]` passes the first, because `T` could be `Never`, and was then rejected at every call from one side or the other. a variadic pack's bound describes its members rather than the pack's own value, so it never reaches the constraint set and cannot name a type parameter at all. Co-Authored-By: Claude Opus 5 <[email protected]>
…their input a lint doc's bytes are copied verbatim into `ty.schema.json` and `crates/ty/docs/rules.md`, and three hooks reformat those docs — mdformat, markdownlint-fix, and `mdtest format`. running `cargo dev generate-all` before them leaves both artifacts holding the unformatted text, which `ruff_dev`'s `generate_ty_schema` and `ty_rules_up_to_date` tests then fail on. the hook is scoped to the lint docs, so an ordinary commit does not pay for a `ruff_dev` build. Co-Authored-By: Claude Opus 5 <[email protected]>
the framework — its `@composable` and `@builder` decorators, its observables and the content blocks they are read in — is recognized as a dedicated module, which the rest of this rests on. unlike the other frameworks it is recognized wherever it resolves, first-party included, because it is developed in place. - eight lints over a composition: the content-block control flow rules, the writes a composition may not make, and `unobservable-dependency`, which keeps a composition from depending on a value nothing can observe changing - the observables a `def` reads while composing, inferred through its callees, and what a state write re-runs — the `inferredReads`, `parameterStability`, `derivedDependencies` and `inferredInvalidations` inlay hints - the block fixes the framework's api needs: a generic callee's block binds `it` from what the call solves for it, a declaration inside a block is the block's own local rather than a capture, and a `context` parameter is filled ahead of the block's own keyword two fixes fall out of that last one. the parser only lets a *borrowed* callback — one carrying `once` or `local` — follow a `context` parameter, because anything else a positional argument could reach would bind to the context parameter instead. and the lowering writes a separator between a block's keyword and an implicit `context` argument, which otherwise ran together: `Card():` with a context parameter lowered to `Card(theme=themecontent=_trailing_lambda_0)`. `docs/basedpython/frameworks/basedpython-ui.md` describes the model. Co-Authored-By: Claude Opus 5 <[email protected]>
a trailing-lambda block is hoisted into a `def` placed before the statement that owns it, and the source map charged every line of that `def` — its header, its whole body, and every block nested inside it — to the one line the edit started on, while the owning statement's own generated line got whatever line the re-emitted source ended at. so a traceback inside a handler named the `Column(…):` that owns the handler's block, a breakpoint set on the write bound to that line too, and the ui framework's trace reported a state write against a statement eleven lines above the write. the bug was in the table primitive rather than the lowering. an edit's replacement is not one thing: a template re-emits spans of the source it rewrites around text the lowering wrote itself, and reading it back as a `String` loses which is which. a `Replacement` now remembers the runs it was assembled from — `Copied(source offset)` and `Generated(anchor offset)` — and the table charges an output line to the first copied text on it, failing that to the anchor of the first generated text on it (a hoisted header, an injected keyword: the construct they stand for), and failing that to the run that terminates the line, so a copied blank line maps to itself. whitespace charges nothing, which is what puts an injected keyword on the closing-paren line of a multi-line header with the statement it belongs to. a statement re-rendered from its AST keeps no ranges, so every line of it is still charged to the statement; that is stated where it happens and pinned by a test rather than left to be rediscovered. Co-Authored-By: Claude Opus 5 <[email protected]>
a generic function's signature is inferred in its type-parameter scope, and a non-generic one's is deferred to the enclosing scope. both go through `infer_function_signature_annotations`, which infers the `raises` clause — and `infer_function_type_params` inferred it a second time on the way there. `raises ...` is where that shows: the ellipsis is the gradual exception set rather than a type expression, so it is inferred as a plain value, and storing one expression's type twice in a region trips an assertion. any generic function with `raises ...` panicked the checker. the duplicate call came in with the upstream merge in 0cd20e6, which added the call inside `infer_function_signature_annotations` without dropping the existing one in its caller. main panics on def make[T](initial: T) -> int raises ...: return 1 Co-Authored-By: Claude Opus 5 <[email protected]>
KotlinIsland
force-pushed
the
features-and-fixes
branch
from
September 7, 2026 02:01
218daad to
3a9ac48
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.