Add error for invalid TypeGuard
function
#4448
Labels
addressed in next version
Issue is fixed and will appear in next published version
enhancement request
New feature or request
A user-defined
TypeGuard
function (as defined in PEP 647) is invalid if it doesn't define at least one input parameter. If the function is an instance or class method, it must provide at least one input parameter beyondself
orcls
. This has been a source of confusion, so an error should perhaps be emitted in this case.See python/mypy#14425.
The text was updated successfully, but these errors were encountered: