jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/705168 )
Change subject: [IMPR] daemonize.py type hints ......................................................................
[IMPR] daemonize.py type hints
Bug: T286403 Change-Id: I5ab426b54f325ce95c0df757715f8809fcf5a440 --- M pywikibot/daemonize.py 1 file changed, 3 insertions(+), 4 deletions(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/daemonize.py b/pywikibot/daemonize.py index fdecae3..16f3716 100644 --- a/pywikibot/daemonize.py +++ b/pywikibot/daemonize.py @@ -8,6 +8,7 @@ import os import stat import sys +from typing import Optional
from pywikibot.tools import deprecated_args
@@ -16,7 +17,8 @@
@deprecated_args(write_pid=True) -def daemonize(close_fd=True, chdir=True, redirect_std=None): +def daemonize(close_fd: bool = True, chdir: bool = True, + redirect_std: Optional[str] = None) -> None: """ Daemonize the current process.
@@ -24,11 +26,8 @@ The process will fork to the background and return control to terminal.
:param close_fd: Close the standard streams and replace them by /dev/null - :type close_fd: bool :param chdir: Change the current working directory to / - :type chdir: bool :param redirect_std: Filename to redirect stdout and stdin to - :type redirect_std: str """ # Fork away if not os.fork():