typed-argument-default-in-stub
(PYI011
) - false positive when default value intentionally used to infer the default value of a generic
#12999
Labels
not sure if this is something that can be determined without type analysis (#3893), but sometimes
PYI011
conflicts with pyright'sreportInvalidTypeVarUse
rule. for example, in the following.pyi
file:if we take ruff's advice and omit the default value here, it prevents type checkers from being able to infer the generic based on the default value, which is why pyright reports an error:
The text was updated successfully, but these errors were encountered: