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

Enable --warn-unreachable in --strict in Mypy 2.0 #18078

Open
davidhalter opened this issue Oct 31, 2024 · 1 comment
Open

Enable --warn-unreachable in --strict in Mypy 2.0 #18078

davidhalter opened this issue Oct 31, 2024 · 1 comment
Labels
topic-configuration Configuration files and flags topic-reachability Detecting unreachable code

Comments

@davidhalter
Copy link

It is questionable why --strict does not just enable --warn-unreachable. A lot of people probably think "I'm running --strict, there's nothing else important to enable".

@sobolevn told me to create this issue in #18076 (comment)

@davidhalter davidhalter added the bug mypy got something wrong label Oct 31, 2024
@cdce8p
Copy link
Collaborator

cdce8p commented Oct 31, 2024

To quote my comment from #17944

warn-unreachable is nice but form my experience often not completely accurate, unfortunately. It's fine to use with type: ignore[unreachable] but I'm not sure it's ready for --strict mode just yet.

@cdce8p cdce8p added topic-configuration Configuration files and flags and removed bug mypy got something wrong labels Oct 31, 2024
@sobolevn sobolevn added the topic-reachability Detecting unreachable code label Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic-configuration Configuration files and flags topic-reachability Detecting unreachable code
Projects
None yet
Development

No branches or pull requests

3 participants