src/eric7/SystemUtilities/OSUtilities.py

branch
eric7
changeset 10431
64157aeb0312
parent 10339
446d22fa1aea
child 10439
21c28b0f9e41
--- a/src/eric7/SystemUtilities/OSUtilities.py	Wed Dec 20 19:28:22 2023 +0100
+++ b/src/eric7/SystemUtilities/OSUtilities.py	Thu Dec 21 12:03:40 2023 +0100
@@ -71,7 +71,8 @@
     """
     Function to get the user name.
 
-    @return user name (string)
+    @return user name
+    @rtype str
     """
     user = getpass.getuser()
 
@@ -85,7 +86,8 @@
     """
     Function to get the real name of the user.
 
-    @return real name of the user (string)
+    @return real name of the user
+    @rtype str
     """
     if isWindowsPlatform():
         return win32_getRealName()
@@ -98,7 +100,8 @@
     """
     Function to get a users home directory.
 
-    @return home directory (string)
+    @return home directory
+    @rtype str
     """
     return os.path.expanduser("~")
 
@@ -112,11 +115,13 @@
     """
     Module function to get an environment entry.
 
-    @param key key of the requested environment entry (string)
-    @param default value to be returned, if the environment doesn't contain
-        the requested entry (string)
-    @return the requested entry or the default value, if the entry wasn't
-        found (string or None)
+    @param key key of the requested environment entry
+    @type str
+    @param default value to be returned, if the environment doesn't contain the
+        requested entry
+    @type str
+    @return the requested entry or the default value, if the entry wasn't found
+    @rtype str
     """
     if key in os.environ:
         entryKey = key
@@ -155,8 +160,10 @@
     """
     Function to provide an os.kill equivalent for Win32.
 
-    @param pid process id (integer)
-    @return result of the kill (boolean)
+    @param pid process id
+    @type int
+    @return result of the kill
+    @rtype bool
     """
     import win32api  # __IGNORE_WARNING_I102__
 
@@ -168,7 +175,8 @@
     """
     Function to get the user name under Win32.
 
-    @return user name (string)
+    @return user name
+    @rtype str
     """
     try:
         import win32api  # __IGNORE_WARNING_I10__
@@ -186,7 +194,8 @@
     """
     Function to get the user's real name (aka. display name) under Win32.
 
-    @return real name of the current user (string)
+    @return real name of the current user
+    @rtype str
     """
     GetUserNameEx = ctypes.windll.secur32.GetUserNameExW
     NameDisplay = 3

eric ide

mercurial