Closed arnimarj closed 1 year ago
This is probably caused by https://github.com/python/mypy/pull/13729
It doesn't seem like ellipses help here (I'm getting the same error if I replace pass
with ...
). And clearly we don't want these errors for zope interface methods. Trying to figure out the workaround.
That particular issue was easy to work around by explicitly marking interface methods as "abstract". However now mypy complains about not being able to instantiate abstract classes when we do "adaptation pattern". And there seem to be some deeper issue in mypy that prevents a "nice" solution for this right now. Filed https://github.com/python/mypy/issues/14106, waiting or some response.
Hi. I was testing the upcoming mypy release and it seems to be emitting new warning for interface definitions:
gives:
Replacing the function body with ellipses silences the warning. Perhaps that should be the preferred way to define interfaces moving forward?