Skip to content

psutil: Type ad_value as object #14106

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions stubs/psutil/psutil/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ class Process:
info: dict[str, Any]
def oneshot(self) -> AbstractContextManager[None]: ...
def as_dict(
self, attrs: list[str] | tuple[str, ...] | set[str] | frozenset[str] | None = None, ad_value=None
self, attrs: list[str] | tuple[str, ...] | set[str] | frozenset[str] | None = None, ad_value: object = None
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
self, attrs: list[str] | tuple[str, ...] | set[str] | frozenset[str] | None = None, ad_value: object = None
self,
attrs: list[str] | tuple[str, ...] | set[str] | frozenset[str] | None = None,
ad_value: Any = None, # arbitrary value used as result in case of error

) -> dict[str, Any]: ...
def parent(self) -> Process | None: ...
def parents(self) -> list[Process]: ...
Expand Down Expand Up @@ -236,7 +236,7 @@ class Popen(Process):
def pids() -> list[int]: ...
def pid_exists(pid: int) -> bool: ...
def process_iter(
attrs: list[str] | tuple[str, ...] | set[str] | frozenset[str] | None = None, ad_value=None
attrs: list[str] | tuple[str, ...] | set[str] | frozenset[str] | None = None, ad_value: object = None
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
attrs: list[str] | tuple[str, ...] | set[str] | frozenset[str] | None = None, ad_value: object = None
attrs: list[str] | tuple[str, ...] | set[str] | frozenset[str] | None = None,
ad_value: Any = None, # arbitrary value used as result in case of error

) -> Iterator[Process]: ...
def wait_procs(
procs: Iterable[Process], timeout: float | None = None, callback: Callable[[Process], object] | None = None
Expand Down