mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 13:34:58 +08:00
Adds more missing ContextManager types (#6007)
1.c3e63b4dd5/psutil/_psbsd.py (L571)2.c3e63b4dd5/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