mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-30 16:14:24 +08:00
Use typing_extensions.Self in the stdlib (#9694)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import abc
|
||||
import pathlib
|
||||
import sys
|
||||
from _typeshed import Self, StrPath
|
||||
from _typeshed import StrPath
|
||||
from collections.abc import Iterable, Mapping
|
||||
from email.message import Message
|
||||
from importlib.abc import MetaPathFinder
|
||||
@@ -9,6 +9,7 @@ from os import PathLike
|
||||
from pathlib import Path
|
||||
from re import Pattern
|
||||
from typing import Any, ClassVar, NamedTuple, overload
|
||||
from typing_extensions import Self
|
||||
|
||||
__all__ = [
|
||||
"Distribution",
|
||||
@@ -86,13 +87,13 @@ if sys.version_info >= (3, 10):
|
||||
|
||||
class SelectableGroups(dict[str, EntryPoints]): # use as dict is deprecated since 3.10
|
||||
@classmethod
|
||||
def load(cls: type[Self], eps: Iterable[EntryPoint]) -> Self: ...
|
||||
def load(cls, eps: Iterable[EntryPoint]) -> Self: ...
|
||||
@property
|
||||
def groups(self) -> set[str]: ...
|
||||
@property
|
||||
def names(self) -> set[str]: ...
|
||||
@overload
|
||||
def select(self: Self) -> Self: ... # type: ignore[misc]
|
||||
def select(self) -> Self: ... # type: ignore[misc]
|
||||
@overload
|
||||
def select(
|
||||
self,
|
||||
|
||||
Reference in New Issue
Block a user