6868
6969.. code-block :: python
7070
71- from typing import Iterable
72- from typing_extensions import Protocol
71+ from typing import Iterable, Protocol
7372
7473 class SupportsClose (Protocol ):
7574 # Empty method body (explicit '...')
@@ -226,8 +225,7 @@ such as trees and linked lists:
226225
227226.. code-block :: python
228227
229- from typing import TypeVar, Optional
230- from typing_extensions import Protocol
228+ from typing import TypeVar, Optional, Protocol
231229
232230 class TreeLike (Protocol ):
233231 value: int
@@ -255,7 +253,7 @@ rudimentary support for runtime structural checks:
255253
256254.. code-block :: python
257255
258- from typing_extensions import Protocol, runtime_checkable
256+ from typing import Protocol, runtime_checkable
259257
260258 @runtime_checkable
261259 class Portable (Protocol ):
@@ -298,8 +296,7 @@ member:
298296
299297.. code-block :: python
300298
301- from typing import Optional, Iterable
302- from typing_extensions import Protocol
299+ from typing import Optional, Iterable, Protocol
303300
304301 class Combiner (Protocol ):
305302 def __call__ (self , * vals : bytes , maxlen : Optional[int ] = None ) -> list[bytes ]: ...
@@ -323,8 +320,7 @@ a double underscore prefix is used. For example:
323320
324321.. code-block :: python
325322
326- from typing import Callable, TypeVar
327- from typing_extensions import Protocol
323+ from typing import Callable, Protocol, TypeVar
328324
329325 T = TypeVar(' T' )
330326
0 commit comments