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

+3
View File
@@ -1,5 +1,7 @@
from typing import Any, Callable
from typing_extensions import final
@final
class make_encoder:
sort_keys: Any
skipkeys: Any
@@ -23,6 +25,7 @@ class make_encoder:
) -> None: ...
def __call__(self, obj: object, _current_indent_level: int) -> Any: ...
@final
class make_scanner:
object_hook: Any
object_pairs_hook: Any