Improves Popen types in psutil (#6074)

This commit is contained in:
Nikita Sobolev
2021-09-25 22:42:05 +03:00
committed by GitHub
parent 583aa16876
commit a9227ed985

View File

@@ -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: ...