-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Labels
false-positivemypy gave an error on correct codemypy gave an error on correct codefeaturepriority-1-normal
Description
For me, this code:
from functools import singledispatch
@singledispatch
def cmp(other, match):
return match in (..., other)
@cmp.register(type)
def _(other, match):
return isinstance(match, other)`
results in the mypy error:
severity: 'Error'
message: 'error:'overload' decorator expected'
on the line @cmp.register(type)
mypy version:
PS C:\Program Files (x86)\Python36-32> .\scripts\mypy.bat --version
mypy 0.471
PS C:\Program Files (x86)\Python36-32>
What should I do to resolve the error?
joelberkeley-secondmind, dsedivec, maxrothman, madig, NeilGirdhar and 4 more
Metadata
Metadata
Assignees
Labels
false-positivemypy gave an error on correct codemypy gave an error on correct codefeaturepriority-1-normal