mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-15 08:17:07 +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:
@@ -60,7 +60,7 @@ from typing import (
|
||||
ValuesView,
|
||||
overload,
|
||||
)
|
||||
from typing_extensions import Literal, SupportsIndex
|
||||
from typing_extensions import Literal, SupportsIndex, final
|
||||
|
||||
if sys.version_info >= (3, 9):
|
||||
from types import GenericAlias
|
||||
@@ -666,6 +666,7 @@ class memoryview(Sized, Container[int]):
|
||||
else:
|
||||
def hex(self) -> str: ...
|
||||
|
||||
@final
|
||||
class bool(int):
|
||||
def __new__(cls: Type[_T], __o: object = ...) -> _T: ...
|
||||
@overload
|
||||
|
||||
Reference in New Issue
Block a user