mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 21:14:48 +08:00
Add @final to many unsubclassable stdlib classes (#6299)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import sys
|
||||
from typing import Any, Callable, ClassVar, Iterable, Iterator, Mapping, Optional, Protocol, Tuple, Type, Union
|
||||
from typing_extensions import final
|
||||
|
||||
HIGHEST_PROTOCOL: int
|
||||
DEFAULT_PROTOCOL: int
|
||||
@@ -15,6 +16,7 @@ class _WritableFileobj(Protocol):
|
||||
|
||||
if sys.version_info >= (3, 8):
|
||||
# TODO: holistic design for buffer interface (typing.Buffer?)
|
||||
@final
|
||||
class PickleBuffer:
|
||||
# buffer must be a buffer-providing object
|
||||
def __init__(self, buffer: Any) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user