-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
addressed in next versionIssue is fixed and will appear in next published versionIssue is fixed and will appear in next published versionenhancement requestNew feature or requestNew feature or request
Description
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 beyond self
or cls
. This has been a source of confusion, so an error should perhaps be emitted in this case.
See python/mypy#14425.
Metadata
Metadata
Assignees
Labels
addressed in next versionIssue is fixed and will appear in next published versionIssue is fixed and will appear in next published versionenhancement requestNew feature or requestNew feature or request