3
3
# See the README.md file in this directory for more information.
4
4
5
5
import sys
6
- import typing_extensions
7
6
from collections .abc import Awaitable , Callable , Iterable , Sequence , Set as AbstractSet , Sized
8
7
from dataclasses import Field
9
8
from os import PathLike
@@ -23,7 +22,7 @@ from typing import (
23
22
final ,
24
23
overload ,
25
24
)
26
- from typing_extensions import Buffer , LiteralString , TypeAlias
25
+ from typing_extensions import Buffer , LiteralString , Self as _Self , TypeAlias
27
26
28
27
_KT = TypeVar ("_KT" )
29
28
_KT_co = TypeVar ("_KT_co" , covariant = True )
@@ -329,9 +328,9 @@ class structseq(Generic[_T_co]):
329
328
# The second parameter will accept a dict of any kind without raising an exception,
330
329
# but only has any meaning if you supply it a dict where the keys are strings.
331
330
# https://github.com/python/typeshed/pull/6560#discussion_r767149830
332
- def __new__ (cls , sequence : Iterable [_T_co ], dict : dict [str , Any ] = ...) -> typing_extensions . Self : ...
331
+ def __new__ (cls , sequence : Iterable [_T_co ], dict : dict [str , Any ] = ...) -> _Self : ...
333
332
if sys .version_info >= (3 , 13 ):
334
- def __replace__ (self , ** kwargs : Any ) -> typing_extensions . Self : ...
333
+ def __replace__ (self , ** kwargs : Any ) -> _Self : ...
335
334
336
335
# Superset of typing.AnyStr that also includes LiteralString
337
336
AnyOrLiteralStr = TypeVar ("AnyOrLiteralStr" , str , bytes , LiteralString ) # noqa: Y001
0 commit comments