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,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.