8000 Improves `Popen` types in `psutil` by sobolevn · Pull Request #6074 · python/typeshed · GitHub
[go: up one dir, main page]

Skip to content

Improves Popen types in psutil #6074

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 25, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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