Add @final to several stdlib classes that cannot be subclassed at runtime (#7213)

This commit is contained in:
Alex Waygood
2022-02-14 22:46:30 +00:00
committed by GitHub
parent 4293ad0483
commit 2878050ffc
6 changed files with 13 additions and 3 deletions

View File

@@ -1,6 +1,7 @@
import sys
from _typeshed import ReadableBuffer, Self
from typing import AbstractSet
from typing_extensions import final
class _Hash:
@property
@@ -76,7 +77,7 @@ def scrypt(
maxmem: int = ...,
dklen: int = ...,
) -> bytes: ...
@final
class _BlakeHash(_Hash):
MAX_DIGEST_SIZE: int
MAX_KEY_SIZE: int