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

Reimplement additional mypy error codes #16165

Open
ngnpope opened this issue Feb 14, 2025 · 3 comments
Open

Reimplement additional mypy error codes #16165

ngnpope opened this issue Feb 14, 2025 · 3 comments
Labels
red-knot Multi-file analysis & type inference

Comments

@ngnpope
Copy link
Contributor

ngnpope commented Feb 14, 2025

Description

There are a number of extra error codes not enabled by default in mypy, many of which are very handy:

enable_error_code = [
    "deprecated",
    "explicit-override",
    "ignore-without-code",
    "mutable-override",
    "possibly-undefined",
    "redundant-expr",
    "redundant-self",
    "truthy-bool",
    "truthy-iterable",
    "unimported-reveal",
    "unused-awaitable",
]

It would be useful for these to be reimplemented under ruff/red-knot.

Related issues:

@MichaReiser
Copy link
Member

Thanks for the suggestion.

Just skimming through. To me it seems that most of them require multifile analysis to be useful and Ruff doesn't support that yet. That's why I'm inclined to close the issue as it isn't actionable until we implement multifile analysis (which we're working on but it isn't just around the corner).

It's also likely that we implement some of those checks as part of red-knot, our work-in progress type checkers.

Related issue: #9833

@MichaReiser MichaReiser added the rule Implementing or modifying a lint rule label Feb 14, 2025
@ngnpope
Copy link
Contributor Author

ngnpope commented Feb 14, 2025

It's also likely that we implement some of those checks as part of red-knot, our work-in progress type checkers.

Sorry - yes - this was intended as raising interest w.r.t. that work rather than as lint rules for ruff (and for tracking).

@MichaReiser
Copy link
Member

No worries. it's good to know what you all are looking for. It helps with prioritisation :)

@AlexWaygood AlexWaygood added red-knot Multi-file analysis & type inference and removed rule Implementing or modifying a lint rule labels Feb 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
red-knot Multi-file analysis & type inference
Projects
None yet
Development

No branches or pull requests

3 participants