python / mypy

Optional static typing for Python
https://www.mypy-lang.org/
Other
17.85k stars 2.74k forks source link

Allow mixing ParamSpec and TypeVarTuple in Generic #17450

Closed ilevkivskyi closed 3 days ago

ilevkivskyi commented 3 days ago

Fixes https://github.com/python/mypy/issues/16696 Fixes https://github.com/python/mypy/issues/16695

I think there are no good reasons to not allow this anymore. Also I am using this opportunity to tighten a bit invalid instances/aliases where a regular type variable is replaced with parameters and vice versa.

github-actions[bot] commented 3 days ago

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅