Closed
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?