Add @final to many unsubclassable stdlib classes (#6299)

This commit is contained in:
Alex Waygood
2021-11-15 13:45:24 +00:00
committed by GitHub
parent 5b94c6a94d
commit 10c9d8cfce
17 changed files with 48 additions and 9 deletions

View File

@@ -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: ...