--- a/src/eric7/WebBrowser/UserAgent/UserAgentManager.py Fri Dec 22 13:57:47 2023 +0100 +++ b/src/eric7/WebBrowser/UserAgent/UserAgentManager.py Fri Dec 22 17:24:07 2023 +0100 @@ -32,7 +32,8 @@ """ Constructor - @param parent reference to the parent object (QObject) + @param parent reference to the parent object + @type QObject """ super().__init__(parent) @@ -47,7 +48,8 @@ """ Public method to get the file name of the user agents file. - @return name of the user agents file (string) + @return name of the user agents file + @rtype str """ return os.path.join( Globals.getConfigDir(), "web_browser", "userAgentSettings.xml" @@ -118,7 +120,8 @@ """ Public method to remove a user agent entry. - @param host host name (string) + @param host host name + @type str """ if host in self.__agents: del self.__agents[host] @@ -129,7 +132,8 @@ Public method to get a list of all host names we a user agent setting for. - @return sorted list of all host names (list of strings) + @return sorted list of all host names + @rtype list of str """ if not self.__loaded: self.__load() @@ -140,7 +144,8 @@ """ Public method to get the number of available user agent settings. - @return number of user agent settings (integer) + @return number of user agent settings + @rtype int """ if not self.__loaded: self.__load() @@ -151,8 +156,10 @@ """ Public method to get the user agent setting for a host. - @param host host name (string) - @return user agent string (string) + @param host host name + @type str + @return user agent string + @rtype str """ if not self.__loaded: self.__load() @@ -167,8 +174,10 @@ """ Public method to set the user agent string for a host. - @param host host name (string) - @param agent user agent string (string) + @param host host name + @type str + @param agent user agent string + @type str """ if host != "" and agent != "": self.__agents[host] = agent @@ -178,8 +187,10 @@ """ Public method to determine the user agent for the given URL. - @param url URL to determine user agent for (QUrl) - @return user agent string (string) + @param url URL to determine user agent for + @type QUrl + @return user agent string + @rtype str """ if url.isValid(): host = url.host() @@ -191,8 +202,10 @@ """ Public method to set the user agent string for an URL. - @param url URL to register user agent setting for (QUrl) - @param agent new current user agent string (string) + @param url URL to register user agent setting for + @type QUrl + @param agent new current user agent string + @type str """ if url.isValid(): host = url.host()