diff options
author | AUTOMATIC <16777216c@gmail.com> | 2023-05-10 08:05:02 +0000 |
---|---|---|
committer | AUTOMATIC <16777216c@gmail.com> | 2023-05-10 08:05:02 +0000 |
commit | 028d3f6425d85f122027c127fba8bcbf4f66ee75 (patch) | |
tree | 05e714f118aaa4d25920918807e0b83344133629 /modules/ui_extra_networks.py | |
parent | e42de4b8a2356c6d286adb07292442d75e5595d3 (diff) | |
download | stable-diffusion-webui-gfx803-028d3f6425d85f122027c127fba8bcbf4f66ee75.tar.gz stable-diffusion-webui-gfx803-028d3f6425d85f122027c127fba8bcbf4f66ee75.tar.bz2 stable-diffusion-webui-gfx803-028d3f6425d85f122027c127fba8bcbf4f66ee75.zip |
ruff auto fixes
Diffstat (limited to 'modules/ui_extra_networks.py')
-rw-r--r-- | modules/ui_extra_networks.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/ui_extra_networks.py b/modules/ui_extra_networks.py index 800e467a..ab585917 100644 --- a/modules/ui_extra_networks.py +++ b/modules/ui_extra_networks.py @@ -26,7 +26,7 @@ def register_page(page): def fetch_file(filename: str = ""):
from starlette.responses import FileResponse
- if not any([Path(x).absolute() in Path(filename).absolute().parents for x in allowed_dirs]):
+ if not any(Path(x).absolute() in Path(filename).absolute().parents for x in allowed_dirs):
raise ValueError(f"File cannot be fetched: {filename}. Must be in one of directories registered by extra pages.")
ext = os.path.splitext(filename)[1].lower()
@@ -326,7 +326,7 @@ def setup_ui(ui, gallery): is_allowed = False
for extra_page in ui.stored_extra_pages:
- if any([path_is_parent(x, filename) for x in extra_page.allowed_directories_for_previews()]):
+ if any(path_is_parent(x, filename) for x in extra_page.allowed_directories_for_previews()):
is_allowed = True
break
|