mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 13:34:58 +08:00
Add @final to many unsubclassable stdlib classes (#6299)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
from _typeshed import Self
|
||||
from types import TracebackType
|
||||
from typing import Any, Type, Union
|
||||
from typing_extensions import final
|
||||
|
||||
_KeyType = Union[HKEYType, int]
|
||||
|
||||
@@ -88,6 +89,7 @@ REG_WHOLE_HIVE_VOLATILE: int # undocumented
|
||||
error = OSError
|
||||
|
||||
# Though this class has a __name__ of PyHKEY, it's exposed as HKEYType for some reason
|
||||
@final
|
||||
class HKEYType:
|
||||
def __bool__(self) -> bool: ...
|
||||
def __int__(self) -> int: ...
|
||||
|
||||
Reference in New Issue
Block a user