mypy
mypy copied to clipboard
The implementation of TypeChecker.fail is incorrect
Hi, it appears that TypeChecker.fail doesn't match the CheckerPluginInterface interface
https://github.com/python/mypy/blob/d39f0234a18762a9b261a28763c7bea706633ce7/mypy/plugin.py#L242
@abstractmethod
def fail(
self, msg: str | ErrorMessage, ctx: Context, *, code: ErrorCode | None = None
) -> None:
https://github.com/python/mypy/blob/d39f0234a18762a9b261a28763c7bea706633ce7/mypy/checker.py#L7184
def fail(
self, msg: str | ErrorMessage, context: Context, *, code: ErrorCode | None = None
) -> None:
For some reason the implementation names ctx as context.