Use singleton enum for "not set" sentinels (#41990)
* Use singleton enum for "not set" sentinel https://www.python.org/dev/peps/pep-0484/#support-for-singleton-types-in-unions * Remove unused variable
This commit is contained in:
parent
de04a1ed67
commit
317ed418dd
11 changed files with 139 additions and 131 deletions
|
@ -89,7 +89,7 @@ block_async_io.enable()
|
|||
fix_threading_exception_logging()
|
||||
|
||||
T = TypeVar("T")
|
||||
_UNDEF: dict = {}
|
||||
_UNDEF: dict = {} # Internal; not helpers.typing.UNDEFINED due to circular dependency
|
||||
# pylint: disable=invalid-name
|
||||
CALLABLE_T = TypeVar("CALLABLE_T", bound=Callable)
|
||||
CALLBACK_TYPE = Callable[[], None]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue