You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This annotation prohibits heterogeneous concatenation, although it is actually allowed in runtime.
I think the annotation should be as follows to solve this problem:
From microsoft/pyright#1777
[0] + ["a"]
is not allowed in any type checker (e.g.pyright
,mypy
) because the type annotation oflist.__add__
is defined as follows:This annotation prohibits heterogeneous concatenation, although it is actually allowed in runtime.
I think the annotation should be as follows to solve this problem:
The text was updated successfully, but these errors were encountered: