diff --git a/stubs/psutil/psutil/__init__.pyi b/stubs/psutil/psutil/__init__.pyi index ccfc18019e92..6c4fda89160f 100644 --- a/stubs/psutil/psutil/__init__.pyi +++ b/stubs/psutil/psutil/__init__.pyi @@ -288,11 +288,16 @@ class Process: def username(self) -> str: ... def create_time(self) -> float: ... def cwd(self) -> str: ... - def nice(self, value: int | None = None) -> int: ... + + @overload + def nice(self, value: None = None) -> int: ... + @overload + def nice(self, value: int) -> None: ... + if sys.platform != "win32": def uids(self) -> _ntp.puids: ... def gids(self) -> _ntp.pgids: ... - def terminal(self) -> str: ... + def terminal(self) -> str | None: ... def num_fds(self) -> int: ... if sys.platform != "darwin": def io_counters(self) -> _ntp.pio: ...