mypy-zope
mypy-zope copied to clipboard
adaptation callable ought to return a union type with its second argument
i.e.
from zope.interface import Interface
class IFoo(Interface):
def foo() -> int:
...
reveal_type(IFoo(object(), None))
Revealed type is "IFoo"
This ought to be IFoo | None
.