mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-02 01:23:24 +08:00
Reduce use of deprecated typing aliases (#6358)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import sys
|
||||
from typing import Any, Callable, ContextManager, Iterable, Iterator, Tuple, TypeVar
|
||||
from contextlib import AbstractContextManager
|
||||
from typing import Any, Callable, Iterable, Iterator, Tuple, TypeVar
|
||||
|
||||
from ._common import (
|
||||
AIX as AIX,
|
||||
@@ -122,7 +123,7 @@ class Process:
|
||||
def __hash__(self) -> int: ...
|
||||
@property
|
||||
def pid(self) -> int: ...
|
||||
def oneshot(self) -> ContextManager[None]: ...
|
||||
def oneshot(self) -> AbstractContextManager[None]: ...
|
||||
def as_dict(
|
||||
self, attrs: list[str] | Tuple[str, ...] | set[str] | frozenset[str] | None = ..., ad_value: Any | None = ...
|
||||
) -> dict[str, Any]: ...
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from typing import Any, ContextManager, NamedTuple
|
||||
from contextlib import AbstractContextManager
|
||||
from typing import Any, NamedTuple
|
||||
|
||||
from ._common import (
|
||||
FREEBSD as FREEBSD,
|
||||
@@ -109,7 +110,7 @@ def pids(): ...
|
||||
def pid_exists(pid): ...
|
||||
def is_zombie(pid): ...
|
||||
def wrap_exceptions(fun): ...
|
||||
def wrap_exceptions_procfs(inst) -> ContextManager[None]: ...
|
||||
def wrap_exceptions_procfs(inst) -> AbstractContextManager[None]: ...
|
||||
|
||||
class Process:
|
||||
pid: Any
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from typing import Any, ContextManager, NamedTuple
|
||||
from contextlib import AbstractContextManager
|
||||
from typing import Any, NamedTuple
|
||||
|
||||
from ._common import (
|
||||
AccessDenied as AccessDenied,
|
||||
@@ -71,7 +72,7 @@ pid_exists: Any
|
||||
|
||||
def is_zombie(pid): ...
|
||||
def wrap_exceptions(fun): ...
|
||||
def catch_zombie(proc) -> ContextManager[None]: ...
|
||||
def catch_zombie(proc) -> AbstractContextManager[None]: ...
|
||||
|
||||
class Process:
|
||||
pid: Any
|
||||
|
||||
Reference in New Issue
Block a user