Skip to content

Commit 2f7952c

Browse files
authored
Rephrase typing.assert_never docs (#92061)
This change is similar to that in #32069
1 parent d0064a1 commit 2f7952c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Doc/library/typing.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2337,7 +2337,7 @@ Functions and decorators
23372337

23382338
.. function:: assert_never(arg, /)
23392339

2340-
Assert to the type checker that a line of code is unreachable.
2340+
Ask a static type checker to confirm that a line of code is unreachable.
23412341

23422342
Example::
23432343

@@ -2358,7 +2358,7 @@ Functions and decorators
23582358
reachable, it will emit an error. For example, if the type annotation
23592359
for ``arg`` was instead ``int | str | float``, the type checker would
23602360
emit an error pointing out that ``unreachable`` is of type :class:`float`.
2361-
For a call to ``assert_never`` to succeed, the inferred type of
2361+
For a call to ``assert_never`` to pass type checking, the inferred type of
23622362
the argument passed in must be the bottom type, :data:`Never`, and nothing
23632363
else.
23642364

0 commit comments

Comments
 (0)