From 81f8d3e5872b16a7b3b86a12fe97f5017df4256f Mon Sep 17 00:00:00 2001 From: John Griffith Date: Mon, 14 Oct 2024 18:21:43 +0100 Subject: [PATCH] Add warn-unreachable to strict mode This is useful check for dead code analysis --- mypy/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mypy/main.py b/mypy/main.py index 3f25ced16106..539fe912d1da 100644 --- a/mypy/main.py +++ b/mypy/main.py @@ -802,7 +802,7 @@ def add_invertible_flag( add_invertible_flag( "--warn-unreachable", default=False, - strict_flag=False, + strict_flag=True, help="Warn about statements or expressions inferred to be unreachable", group=lint_group, )