Sat, 17 Jul 2021 15:15:03 +0200
Removed an obsolete TODO comment and updated the source code docu.
eric7/Globals/__init__.py | file | annotate | diff | comparison | revisions |
--- a/eric7/Globals/__init__.py Mon Jul 12 19:52:49 2021 +0200 +++ b/eric7/Globals/__init__.py Sat Jul 17 15:15:03 2021 +0200 @@ -44,7 +44,8 @@ """ Function to check, if this is a Windows platform. - @return flag indicating Windows platform (boolean) + @return flag indicating Windows platform + @rtype bool """ return sys.platform.startswith(("win", "cygwin")) @@ -53,7 +54,8 @@ """ Function to check, if this is a Mac platform. - @return flag indicating Mac platform (boolean) + @return flag indicating Mac platform + @rtype bool """ return sys.platform == "darwin" @@ -62,7 +64,8 @@ """ Function to check, if this is a Linux platform. - @return flag indicating Linux platform (boolean) + @return flag indicating Linux platform + @rtype bool """ return sys.platform.startswith("linux") @@ -194,7 +197,8 @@ """ Module function to get the name of the directory storing the config data. - @return directory name of the config dir (string) + @return directory name of the config dir + @rtype str """ if configDir is not None and os.path.exists(configDir): hp = configDir @@ -240,7 +244,8 @@ """ Module function to set the name of the directory storing the config data. - @param d name of an existing directory (string) + @param d name of an existing directory + @type str """ global configDir configDir = os.path.expanduser(d) @@ -257,12 +262,12 @@ return distutils.sysconfig.get_python_lib(True) -# TODO: change this for PyQt6 def getPyQt6ModulesDirectory(): """ Function to determine the path to PyQt6 modules directory. - @return path to the PyQt6 modules directory (string) + @return path to the PyQt6 modules directory + @rtype str """ import distutils.sysconfig @@ -480,7 +485,9 @@ Module function to convert a value to bool. @param value value to be converted + @type str @return converted data + @rtype bool """ if value in ["true", "1", "True"]: return True @@ -495,7 +502,9 @@ Module function to convert a value to a list. @param value value to be converted + @type None, list or Any @return converted data + @rtype list """ if value is None: return [] @@ -510,7 +519,9 @@ Module function to convert a value to a byte array. @param value value to be converted + @type QByteArray or None @return converted data + @rtype QByteArray """ if value is None: return QByteArray() @@ -523,7 +534,9 @@ Module function to convert a value to a dictionary. @param value value to be converted + @type dict or None @return converted data + @rtype dict """ if value is None: return {}