mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 05:24:52 +08:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user