Don't remove files ending with `.tmp` in `~/tmp`
@@ -311,6 +311,9 @@ if "widget" not in os.environ:
if f.endswith(".repl.py"):
continue
+ if f.endswith(".tmp"):
+ continue
+
try:
os.remove(f)
except PermissionError:
