FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add type aliases `FloatInt` and `ComplexInt` by srittau · Pull Request #16068 · python/typeshed · GitHub

Repository navigation

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .pyi  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
8 changes: 8 additions & 0 deletions stdlib/_typeshed/__init__.pyi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,14 @@ Unused: TypeAlias = object # stable
# for more information.
MaybeNone: TypeAlias = Any # stable

# typeshed-internal type aliases to facilitate transition from
# `float` to either `float | int` or `float` (and similar for `complex`).
# When you encounter one of these type aliases, you are encouraged to
# replace them with the correct type. Please don't use them outside typeshed.
# See https://github.com/python/typeshed/issues/16059 for details.
FloatInt: TypeAlias = float | int
ComplexInt: TypeAlias = complex | float | int

# Used to mark arguments that default to a sentinel value. This prevents
# stubtest from complaining about the default value not matching.
#
Expand Down

Back | FazBrowse Home | New Git URL