--- a/scripts/uninstall.py Sun Dec 03 14:54:00 2023 +0100 +++ b/scripts/uninstall.py Mon Jan 01 11:10:45 2024 +0100 @@ -1,7 +1,7 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- -# Copyright (c) 2002 - 2023 Detlev Offenbach <detlev@die-offenbachs.de> +# Copyright (c) 2002 - 2024 Detlev Offenbach <detlev@die-offenbachs.de> # # This is the uninstall script for eric. # @@ -34,7 +34,8 @@ """ Exit the uninstall script. - @param rcode result code to report back (integer) + @param rcode result code to report back + @type int """ global currDir @@ -90,13 +91,16 @@ Create the platform specific names for the wrapper script. @param dname name of the directory to place the wrapper into + @type str @param wfile basename (without extension) of the wrapper script - @return the names of the wrapper scripts + @type str + @return list of names of the wrapper scripts + @rtype list of str """ wnames = ( - (dname + "\\" + wfile + ".cmd", dname + "\\" + wfile + ".bat") + [dname + "\\" + wfile + ".cmd", dname + "\\" + wfile + ".bat"] if sys.platform.startswith(("win", "cygwin")) - else (dname + "/" + wfile,) + else [dname + "/" + wfile] ) return wnames @@ -181,7 +185,7 @@ with contextlib.suppress(AttributeError): dirpath = getConfig(name) if os.path.exists(dirpath): - shutil.rmtree(dirpath, True) + shutil.rmtree(dirpath, ignore_errors=True) # Cleanup translations for name in glob.glob( @@ -243,8 +247,7 @@ return regPath = ( - "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer" - + "\\User Shell Folders" + "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders" ) # 1. cleanup desktop links @@ -412,7 +415,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 """ cdn = ".eric7" return os.path.join(os.path.expanduser("~"), cdn) @@ -427,7 +431,7 @@ @param path registry path of the variable @type str @return value of requested registry variable - @rtype any + @rtype Any """ # From http://stackoverflow.com/a/35286642 import winreg # __IGNORE_WARNING_I103__