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

@@ -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: ...