basedpyright
basedpyright copied to clipboard
`reportAbstractUsage` conflicts with `reportMissingSuperCall`
from abc import abstractmethod
from typing import override
class Foo:
@abstractmethod
def __enter__(self) -> None: ...
class Bar(Foo):
@override
def __enter__(self) -> None: # error: Method "__enter__" does not call the method of the same name in parent class (reportMissingSuperCall)
...
attempting to fix this triggers reportAbstractUsage:
class Bar(Foo):
@override
def __enter__(self) -> None:
super().__enter__() # error: Method "__enter__" cannot be called because it is abstract and unimplemented (reportAbstractUsage)
https://github.com/microsoft/pyright/issues/7328
related: #120