Skip to content

Commit

Permalink
Improves Popen types in psutil (#6074)
Browse files Browse the repository at this point in the history
  • Loading branch information
sobolevn committed Sep 25, 2021
1 parent 583aa16 commit a9227ed
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions stubs/psutil/psutil/__init__.pyi
Original file line number Diff line number Diff line change
@@ -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,
Expand Down Expand Up @@ -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: ...
Expand Down

0 comments on commit a9227ed

Please sign in to comment.