-
Notifications
You must be signed in to change notification settings - Fork 283
Replace typing_extensions -> typing in examples #1987
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
Changes from 1 commit
1b1da7a
d14195d
16e7648
b9c365e
9a6ea49
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -54,7 +54,7 @@ As an example, consider this simple calculator: | |
| .. code:: python | ||
|
|
||
| import enum | ||
| from typing_extensions import Never | ||
| from typing import Never | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Never needs an infobox as well. (Added in Python 3.11.)
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think I didn't add it for that one because it's already explained in the prose at the start of the page; but I've added an additional infobox below the code snippet now for consistency (and perhaps easier discoverability for people who only skim the page) 👍 |
||
|
|
||
| def assert_never(arg: Never) -> Never: | ||
| raise AssertionError("Expected code to be unreachable") | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's discuss on the issue for now