Marked the bool class as @final because it cannot be subclassed. (#5286)

Co-authored-by: Eric Traut <erictr@microsoft.com>
This commit is contained in:
Eric Traut
2021-05-01 21:38:10 -07:00
committed by GitHub
parent 445a86f4c9
commit 58e083fef9
3 changed files with 6 additions and 3 deletions

View File

@@ -44,7 +44,7 @@ from typing import (
ValuesView,
overload,
)
from typing_extensions import Literal
from typing_extensions import Literal, final
class _SupportsIndex(Protocol):
def __index__(self) -> int: ...
@@ -568,6 +568,7 @@ class memoryview(Sized, Container[str]):
def tobytes(self) -> bytes: ...
def tolist(self) -> List[int]: ...
@final
class bool(int):
def __new__(cls: Type[_T], __o: object = ...) -> _T: ...
@overload