Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The implementation of TypeChecker.fail is incorrect #17442

Closed
delfick opened this issue Jun 26, 2024 · 1 comment
Closed

The implementation of TypeChecker.fail is incorrect #17442

delfick opened this issue Jun 26, 2024 · 1 comment
Labels
bug mypy got something wrong

Comments

@delfick
Copy link

delfick commented Jun 26, 2024

Hi, it appears that TypeChecker.fail doesn't match the CheckerPluginInterface interface

def fail(

    @abstractmethod
    def fail(
        self, msg: str | ErrorMessage, ctx: Context, *, code: ErrorCode | None = None
    ) -> None:

def fail(

    def fail(
        self, msg: str | ErrorMessage, context: Context, *, code: ErrorCode | None = None
    ) -> None:

For some reason the implementation names ctx as context.

@delfick delfick added the bug mypy got something wrong label Jun 26, 2024
delfick added a commit to delfick/extended-mypy-django-plugin that referenced this issue Jun 26, 2024
delfick added a commit to delfick/extended-mypy-django-plugin that referenced this issue Jun 26, 2024
@delfick
Copy link
Author

delfick commented Jul 24, 2024

lovely, thanks @hauntsaninja and @bzoracler !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug mypy got something wrong
Projects
None yet
Development

No branches or pull requests

2 participants