From c7b602ca05f75b892e250c6576c1c507fa93ec7b Mon Sep 17 00:00:00 2001 From: Warren Date: Sun, 27 Aug 2023 10:41:24 +1000 Subject: [PATCH] doc: remove unwanted implication Returning None does not mean that all future calls to the underlying platform will result in a return value of None. It is a certainty for win32 and Emscripten platforms but only a possibility for other platforms. The documentation should only state that the *current* call to the underlying platform was unsuccessful. --- src/_pytest/compat.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/_pytest/compat.py b/src/_pytest/compat.py index 344b2c847..73d77f978 100644 --- a/src/_pytest/compat.py +++ b/src/_pytest/compat.py @@ -314,7 +314,7 @@ def safe_isclass(obj: object) -> bool: def get_user_id() -> int | None: - """Return the current process's real user id or None if it cannot be + """Return the current process's real user id or None if it could not be determined. :return: The user id or None if it could not be determined. @@ -328,7 +328,7 @@ def get_user_id() -> int | None: return None else: # On other platforms, a return value of -1 is assumed to indicate that - # the current process's real user id cannot be determined. + # the current process's real user id could not be determined. ERROR = -1 uid = os.getuid() return uid if uid != ERROR else None