Skip to content

fix Concrete type not assignable to gradual type when TypeVarTuple is involved #4609 - #4839

Open
asukaminato0721 wants to merge 1 commit into
facebook:mainfrom
asukaminato0721:4609
Open

fix Concrete type not assignable to gradual type when TypeVarTuple is involved #4609#4839
asukaminato0721 wants to merge 1 commit into
facebook:mainfrom
asukaminato0721:4609

Conversation

@asukaminato0721

Copy link
Copy Markdown
Collaborator

Summary

Fixes #4609

removes an extra tuple wrapper around forwarded *Ts arguments before checking assignability.

Test Plan

add test

@meta-cla meta-cla Bot added the cla signed label Sep 7, 2026
@github-actions github-actions Bot added the size/s label Sep 7, 2026
@meta-codesync

meta-codesync Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

This pull request has been imported. If you are a Meta employee, you can view this in D119092691. (Because this pull request was imported automatically, there will not be any future comments.)

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown

Diff from mypy_primer, showing the effect of this PR on open source code:

============================================================
SUMMARY
============================================================
Total: +0 new errors, -3 fixed errors
By preset: +0/-3 (default), +0/-3 (strict)

Projects with changes (2):
  core: +0 -2
  trio: +0 -1
============================================================

FULL DIFF DETAILS
------------------------------------------------------------

core (https://github.com/home-assistant/core)
- ERROR homeassistant/components/rfxtrx/entity.py:126:47-81: Unpacked argument `tuple[Unknown, *_Ts]` is not assignable to parameter `*args` with type `tuple[Unknown, *_Ts]` in function `homeassistant.core.HomeAssistant.async_add_executor_job` [bad-argument-type]
- ERROR homeassistant/helpers/dispatcher.py:133:35-88: Unpacked argument `tuple[HomeAssistant, SignalType[*_Ts], *_Ts]` is not assignable to parameter `*args` with type `tuple[HomeAssistant, SignalType[*_Ts] | str, *_Ts]` in function `asyncio.events.AbstractEventLoop.call_soon_threadsafe` [bad-argument-type]

trio (https://github.com/python-trio/trio)
- ERROR src/trio/_dtls.py:1328:35-50: Unpacked argument `tuple[DTLSChannel, *PosArgsT]` is not assignable to varargs type `tuple[DTLSChannel, *PosArgsT]` [bad-argument-type]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Concrete type not assignable to gradual type when TypeVarTuple is involved

2 participants