diff options
author | Roman Beltiukov <maybe.hello.world@gmail.com> | 2023-05-25 15:10:10 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-25 15:10:10 -0700 |
commit | b2530c965c2afd5512c5f9020251fd4be8f067e5 (patch) | |
tree | 0c1620e00ac4eddea514706a5c3bf3e03bd46c70 /modules/ui_tempdir.py | |
parent | 09d9c3d287ee4543d285e0fde8b81603c9751a7e (diff) | |
parent | a6e653be26cc05f4438145fa0082816e9fbbf5fc (diff) |
Merge branch 'dev' into master
Diffstat (limited to 'modules/ui_tempdir.py')
-rw-r--r-- | modules/ui_tempdir.py | 4 |
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":
|