File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -537,13 +537,15 @@ potentially problematic or redundant in some way.
537537 print (x + " bad" )
538538
539539 To help prevent mypy from generating spurious warnings, the "Statement is
540- unreachable" warning will be silenced in exactly two cases:
540+ unreachable" warning will be silenced in exactly three cases:
541541
542542 1. When the unreachable statement is a ``raise `` statement, is an
543543 ``assert False `` statement, or calls a function that has the :py:data: `~typing.NoReturn `
544544 return type hint. In other words, when the unreachable statement
545545 throws an error or terminates the program in some way.
546- 2. When the unreachable statement was *intentionally * marked as unreachable
546+ 2. When the unreachable statement is ``return NotImplemented ``. This
547+ is allowed by mypy due to its use in operator overloading.
548+ 3. When the unreachable statement was *intentionally * marked as unreachable
547549 using :ref: `version_and_platform_checks `.
548550
549551 .. note ::
You can’t perform that action at this time.
0 commit comments