mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-04 12:35:49 +08:00
Adds more missing ContextManager types (#6007)
1. https://github.com/giampaolo/psutil/blob/c3e63b4dd59f1724a7fa29371e53dfa7f46cbcd3/psutil/_psbsd.py#L571 2. https://github.com/giampaolo/psutil/blob/c3e63b4dd59f1724a7fa29371e53dfa7f46cbcd3/psutil/_psosx.py#L365
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from typing import Any, NamedTuple
|
||||
from typing import Any, ContextManager, NamedTuple
|
||||
|
||||
from ._common import (
|
||||
FREEBSD as FREEBSD,
|
||||
@@ -109,7 +109,7 @@ def pids(): ...
|
||||
def pid_exists(pid): ...
|
||||
def is_zombie(pid): ...
|
||||
def wrap_exceptions(fun): ...
|
||||
def wrap_exceptions_procfs(inst) -> None: ...
|
||||
def wrap_exceptions_procfs(inst) -> ContextManager[None]: ...
|
||||
|
||||
class Process:
|
||||
pid: Any
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from typing import Any, NamedTuple
|
||||
from typing import Any, ContextManager, NamedTuple
|
||||
|
||||
from ._common import (
|
||||
AccessDenied as AccessDenied,
|
||||
@@ -71,7 +71,7 @@ pid_exists: Any
|
||||
|
||||
def is_zombie(pid): ...
|
||||
def wrap_exceptions(fun): ...
|
||||
def catch_zombie(proc) -> None: ...
|
||||
def catch_zombie(proc) -> ContextManager[None]: ...
|
||||
|
||||
class Process:
|
||||
pid: Any
|
||||
|
||||
Reference in New Issue
Block a user