aboutsummaryrefslogtreecommitdiff
path: root/modules/ui_tempdir.py
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2023-05-18 10:12:17 +0300
committerGitHub <noreply@github.com>2023-05-18 10:12:17 +0300
commit182330ae40c93b761fced8d03bbdd8523f1739d0 (patch)
treec95f2e531cc34475eb39266add6d12a2a5e1e2b3 /modules/ui_tempdir.py
parent0d31f20cbd556ea4ba3d8ad9254bcce71c32088c (diff)
parent983f2c494ad8fed2f08193681ba0bf5dda01555a (diff)
Merge branch 'dev' into ngrok-py
Diffstat (limited to 'modules/ui_tempdir.py')
-rw-r--r--modules/ui_tempdir.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/ui_tempdir.py b/modules/ui_tempdir.py
index 46fa9cb0..f05049e1 100644
--- a/modules/ui_tempdir.py
+++ b/modules/ui_tempdir.py
@@ -23,7 +23,7 @@ def register_tmp_file(gradio, filename):
def check_tmp_file(gradio, filename):
if hasattr(gradio, 'temp_file_sets'):
- return any([filename in fileset for fileset in gradio.temp_file_sets])
+ return any(filename in fileset for fileset in gradio.temp_file_sets)
if hasattr(gradio, 'temp_dirs'):
return any(Path(temp_dir).resolve() in Path(filename).resolve().parents for temp_dir in gradio.temp_dirs)
@@ -72,7 +72,7 @@ def cleanup_tmpdr():
if temp_dir == "" or not os.path.isdir(temp_dir):
return
- for root, dirs, files in os.walk(temp_dir, topdown=False):
+ for root, _, files in os.walk(temp_dir, topdown=False):
for name in files:
_, extension = os.path.splitext(name)
if extension != ".png":