Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions docs/source/command_line.rst
Original file line number Diff line number Diff line change
Expand Up @@ -813,9 +813,6 @@ of the above sections.
strict will catch type errors as long as intentional methods like type ignore
or casting were not used.)

Note: the :option:`--warn-unreachable` flag
is not automatically enabled by the strict flag.

The strict flag does not take precedence over other strict-related flags.
Directly specifying a flag of alternate behavior will override the
behavior of strict, regardless of the order in which they are passed.
Expand Down
2 changes: 1 addition & 1 deletion mypy/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,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,
)
Expand Down
1 change: 0 additions & 1 deletion mypy_self_check.ini
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,4 @@ exclude = mypy/typeshed/|mypyc/test-data/|mypyc/lib-rt/
enable_error_code = ignore-without-code,redundant-expr
enable_incomplete_feature = PreciseTupleTypes
show_error_code_links = True
warn_unreachable = True
fixed_format_cache = True