Make more miscellaneous fields read-only, annotate _json.make_encoder (#7439)

This commit is contained in:
Alex Waygood
2022-03-06 23:41:49 +00:00
committed by GitHub
parent 6cdecae6f9
commit bc72b25a2a
7 changed files with 63 additions and 31 deletions

View File

@@ -2,7 +2,7 @@ import sys
from _typeshed import Self
from concurrent.futures._base import Error, Future as _ConcurrentFuture
from typing import Any, Awaitable, Callable, Generator, Iterable, TypeVar
from typing_extensions import TypeGuard
from typing_extensions import Literal, TypeGuard
from .events import AbstractEventLoop
@@ -42,9 +42,13 @@ if sys.version_info < (3, 7):
class Future(Awaitable[_T], Iterable[_T]):
_state: str
_exception: BaseException
@property
def _exception(self) -> BaseException: ...
_blocking: bool
_log_traceback: bool
@property
def _log_traceback(self) -> bool: ...
@_log_traceback.setter
def _log_traceback(self, val: Literal[False]) -> None: ...
_asyncio_future_blocking: bool # is a part of duck-typing contract for `Future`
def __init__(self, *, loop: AbstractEventLoop | None = ...) -> None: ...
def __del__(self) -> None: ...