I am trying to validate the following example straight from the docs -- Here I renamed the two methods _ from the example to _int and _bool to obviate an issue already reported, i.e., python/mypy#2904
When I run mypy checks on this file, I get the following errors:
negator.py:17: error: "singledispatchmethod[Any]" not callable
negator.py:18: error: "singledispatchmethod[Any]" not callable
Found 2 errors in 1 file (checked 1 source file)
Activity
functools.singledispatchmethod: add __call__ for better results
hauntsaninja commented on Apr 2, 2020
Thanks for the report! Linked PR fixes your repro for me locally.
functools.singledispatchmethod: add __call__ for better results (#3899)