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

This commit is contained in:
Alex Waygood authored and GitHub committed 2022-02-14 14:46:30 -08:00
1 parent 4293ad0483
commit 2878050ffc
6 files changed
+13 -3

No files matched your search

+2 -1
View File
@@ -1,5 +1,6 @@
import sys
from typing import Any, TypeVar
from typing_extensions import final
ucd_3_2_0: UCD
ucnhash_CAPI: Any
@@ -23,7 +24,7 @@ def mirrored(__chr: str) -> int: ...
def name(__chr: str, __default: _T = ...) -> str | _T: ...
def normalize(__form: str, __unistr: str) -> str: ...
def numeric(__chr: str, __default: _T = ...) -> float | _T: ...
@final
class UCD:
# The methods below are constructed from the same array in C
# (unicodedata_functions) and hence identical to the methods above.