diff -r c712d09cc839 -r f6881d10e995 src/eric7/WebBrowser/Sync/DirectorySyncHandler.py --- a/src/eric7/WebBrowser/Sync/DirectorySyncHandler.py Fri Dec 22 13:57:47 2023 +0100 +++ b/src/eric7/WebBrowser/Sync/DirectorySyncHandler.py Fri Dec 22 17:24:07 2023 +0100 @@ -22,16 +22,11 @@ """ Class implementing a synchronization handler using a shared directory. - @signal syncStatus(type_, message) emitted to indicate the synchronization - status (string one of "bookmarks", "history", "passwords", - "useragents" or "speeddial", string) - @signal syncError(message) emitted for a general error with the error - message (string) - @signal syncMessage(message) emitted to send a message about - synchronization (string) - @signal syncFinished(type_, done, download) emitted after a - synchronization has finished (string one of "bookmarks", "history", - "passwords", "useragents" or "speeddial", boolean, boolean) + @signal syncStatus(type_, message) emitted to indicate the synchronization status + @signal syncError(message) emitted for a general error with the error message + @signal syncMessage(message) emitted to send a message about synchronization + @signal syncFinished(type_, done, download) emitted after a synchronization + has finished """ syncStatus = pyqtSignal(str, str) @@ -43,7 +38,8 @@ """ Constructor - @param parent reference to the parent object (QObject) + @param parent reference to the parent object + @type QObject """ super().__init__(parent) self.__forceUpload = False @@ -55,7 +51,7 @@ Public method to do the initial check. @param forceUpload flag indicating a forced upload of the files - (boolean) + @type bool """ if not Preferences.getWebBrowser("SyncEnabled"): return @@ -83,12 +79,13 @@ """ Private method to downlaod the given file. - @param type_ type of the synchronization event (string one - of "bookmarks", "history", "passwords", "useragents" or - "speeddial") - @param fileName name of the file to be downloaded (string) + @param type_ type of the synchronization event (one of + "bookmarks", "history", "passwords", "useragents" or "speeddial") + @type str + @param fileName name of the file to be downloaded + @type str @param timestamp time stamp in seconds of the file to be downloaded - (integer) + @type int """ self.syncStatus.emit(type_, self._messages[type_]["RemoteExists"]) try: @@ -117,10 +114,11 @@ """ Private method to upload the given file. - @param type_ type of the synchronization event (string one - of "bookmarks", "history", "passwords", "useragents" or - "speeddial") - @param fileName name of the file to be uploaded (string) + @param type_ type of the synchronization event (one of "bookmarks", + "history", "passwords", "useragents" or "speeddial") + @type str + @param fileName name of the file to be uploaded + @type str """ QCoreApplication.processEvents() data = self.readFile(fileName, type_) @@ -152,10 +150,11 @@ """ Private method to do the initial synchronization of the given file. - @param type_ type of the synchronization event (string one - of "bookmarks", "history", "passwords", "useragents" or - "speeddial") - @param fileName name of the file to be synchronized (string) + @param type_ type of the synchronization event (one of "bookmarks", + "history", "passwords", "useragents" or "speeddial") + @type str + @param fileName name of the file to be synchronized + @type str """ if ( not self.__forceUpload @@ -247,10 +246,11 @@ """ Private method to synchronize the given file. - @param type_ type of the synchronization event (string one - of "bookmarks", "history", "passwords", "useragents" or - "speeddial") - @param fileName name of the file to be synchronized (string) + @param type_ type of the synchronization event (one of "bookmarks", + "history", "passwords", "useragents" or "speeddial") + @type str + @param fileName name of the file to be synchronized + @type str """ self.syncStatus.emit(type_, self._messages[type_]["Uploading"]) self.__uploadFile(type_, fileName)