mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 05:24:52 +08:00
Improves Popen types in psutil (#6074)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import sys
|
||||
from typing import Any, Callable, ContextManager, Iterable, Iterator
|
||||
from typing import Any, Callable, ContextManager, Iterable, Iterator, TypeVar
|
||||
|
||||
from ._common import (
|
||||
AIX as AIX,
|
||||
@@ -160,13 +160,13 @@ class Process:
|
||||
def kill(self) -> None: ...
|
||||
def wait(self, timeout: int | None = ...) -> int: ...
|
||||
|
||||
_Popen = TypeVar("_Popen", bound="Popen")
|
||||
|
||||
class Popen(Process):
|
||||
def __init__(self, *args, **kwargs) -> None: ...
|
||||
def __dir__(self): ...
|
||||
def __enter__(self): ...
|
||||
def __exit__(self, *args, **kwargs): ...
|
||||
def __getattribute__(self, name): ...
|
||||
def wait(self, timeout: Any | None = ...): ...
|
||||
def __enter__(self: _Popen) -> _Popen: ...
|
||||
def __exit__(self, *args, **kwargs) -> None: ...
|
||||
def __getattribute__(self, name: str) -> Any: ...
|
||||
|
||||
def pids() -> list[int]: ...
|
||||
def pid_exists(pid: int) -> bool: ...
|
||||
|
||||
Reference in New Issue
Block a user