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
In PEP 742, a new TypeIs annotation has been added. This provides an alternative to TypeGuard , which supports proper type narrowing. In vast majority of cases, people should use TypeIs as opposed to TypeGuard and the use of TypeGuard in code is likely a mistake.
It would therefore be nice to have a rule that bans the use of TypeGuard completely, just like the ANN401 rule, that bans typing.Any.
The text was updated successfully, but these errors were encountered:
In PEP 742, a new
TypeIs
annotation has been added. This provides an alternative toTypeGuard
, which supports proper type narrowing. In vast majority of cases, people should useTypeIs
as opposed toTypeGuard
and the use ofTypeGuard
in code is likely a mistake.It would therefore be nice to have a rule that bans the use of
TypeGuard
completely, just like theANN401
rule, that banstyping.Any
.The text was updated successfully, but these errors were encountered: