Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork3k
Closed
Description
Consider this.pyi
code snippet:
fromtypingimportAny,Generic,Self,TypeVar,TypeVarTuple,type_check_onlyT=TypeVar("T")Ts=TypeVarTuple("Ts")@type_check_onlyclassS(tuple[*Ts],Generic[T,*Ts]):deff(self,x:T,/)->T: ...
When ran throughmypy
(checked with1.15.0
and the master branch), the following error is reported
Argument 1 to "type_check_only" has incompatible type "type[S[T, *Ts]]"; expected "type[S[T, *Ts]]" [arg-type]
Without the additionalT
type parameter, the false positive error disappears. It also disappears if I remove thetuple
baseclass.
And as far as I could tell, it doesn't seem to be associated with a particular config option or cli flag.