microsoft/pyright

Contradictory errors for ParamSpec defaults

Closed this issue · 3 comments

Pyright is working as intended here. Both of these error messages apply, and they are not contradictory. One is a syntax error message, the other is a semantic error. If you fix the issue, both errors will go away.

The second error message is incorrect, because it says a "tuple expression" is among the allowed options. In fact, pyright allows only a list expression here, so that's what that error message should say.