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
View File
@@ -2,6 +2,7 @@ import sys
from _typeshed import Self, StrOrBytesPath
from datetime import date, datetime, time
from typing import Any, Callable, Generator, Iterable, Iterator, Protocol, TypeVar
from typing_extensions import final
_T = TypeVar("_T")
@@ -223,6 +224,7 @@ class OperationalError(DatabaseError): ...
OptimizedUnicode = str
@final
class PrepareProtocol:
def __init__(self, *args: Any, **kwargs: Any) -> None: ...