Closed
Description
Please provide more information to help us understand the issue:
- Reporting a bug
- failing (mock) code:
class CustomType:
myattr: str = ''
def _custom_repr(v: CustomType) -> str:
return v.myattr
@attr.s
class MyClass(object)
myvar: CustomType = attr.ib(repr=_custom_repr)
- the actual output:
error: No overload variant matches argument type "Callable[[Any], str]"
- the behavior/output I expect: mypy should succeed
- mypy 0.720
- mypy flags:
--python-version 3.6 --python-executable python3.6
- mypy flags (from config):
ignore_missing_imports = True
- If mypy crashed with a traceback, please paste
the full traceback below.