mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +08:00
Use typing_extensions.Self instead of _typeshed.Self (#9702)
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
from _typeshed import Self, StrOrBytesPath
|
||||
from _typeshed import StrOrBytesPath
|
||||
from codecs import StreamReaderWriter
|
||||
from collections.abc import Generator, Iterator
|
||||
from types import TracebackType
|
||||
from typing_extensions import Self
|
||||
|
||||
MATCHER: str
|
||||
|
||||
@@ -12,7 +13,7 @@ class LogReader:
|
||||
read: int
|
||||
pipe: StreamReaderWriter | None
|
||||
def __init__(self, filename: StrOrBytesPath, mass: int = ...) -> None: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __enter__(self) -> Self: ...
|
||||
def __exit__(
|
||||
self, error_type: type[BaseException] | None, value: BaseException | None, traceback: TracebackType | None
|
||||
) -> None: ...
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import re
|
||||
import subprocess
|
||||
from _typeshed import Incomplete, Self
|
||||
from _typeshed import Incomplete
|
||||
from builtins import range as _range
|
||||
from collections import OrderedDict
|
||||
from collections.abc import Callable, Generator, Iterable, Iterator
|
||||
@@ -8,7 +8,7 @@ from datetime import datetime
|
||||
from logging import Logger
|
||||
from types import TracebackType
|
||||
from typing import Any
|
||||
from typing_extensions import SupportsIndex, TypeAlias
|
||||
from typing_extensions import Self, SupportsIndex, TypeAlias
|
||||
|
||||
from cronlog import CronLog
|
||||
|
||||
@@ -46,7 +46,7 @@ class CronTab:
|
||||
def __init__(
|
||||
self, user: _User = ..., tab: str | None = ..., tabfile: str | None = ..., log: CronLog | str | None = ...
|
||||
) -> None: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __enter__(self) -> Self: ...
|
||||
def __exit__(
|
||||
self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
|
||||
) -> None: ...
|
||||
@@ -115,7 +115,7 @@ class CronItem:
|
||||
def __hash__(self) -> int: ...
|
||||
def __eq__(self, other: object) -> bool: ...
|
||||
@classmethod
|
||||
def from_line(cls: type[Self], line: str, user: str | None = ..., cron: Incomplete | None = ...) -> Self: ...
|
||||
def from_line(cls, line: str, user: str | None = ..., cron: Incomplete | None = ...) -> Self: ...
|
||||
def delete(self) -> None: ...
|
||||
def set_command(self, cmd: str, parse_stdin: bool = ...) -> None: ...
|
||||
def set_comment(self, cmt: str, pre_comment: bool = ...) -> None: ...
|
||||
@@ -257,5 +257,5 @@ class OrderedVariableList(OrderedDict[Incomplete, Incomplete]):
|
||||
def __init__(self, *args: Any, **kw: Any) -> None: ...
|
||||
@property
|
||||
def previous(self) -> Incomplete: ...
|
||||
def all(self: Self) -> Self: ...
|
||||
def all(self) -> Self: ...
|
||||
def __getitem__(self, key: Incomplete) -> Incomplete: ...
|
||||
|
||||
Reference in New Issue
Block a user