Skip to content

Commit

Permalink
make the extension disable instead of unlisted. fix linter
Browse files Browse the repository at this point in the history
  • Loading branch information
wfjsw committed Nov 11, 2023
1 parent 6a40eb6 commit db48f6d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
9 changes: 4 additions & 5 deletions modules/extensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def list_extensions():
}

# check for requirements
for (canonical_name, extension_data) in extension_dependency_map.items():
for (_, extension_data) in extension_dependency_map.items():
dirname, path, requires = extension_data['dirname'], extension_data['path'], extension_data['requires']
requirement_met = True
for req in requires:
Expand All @@ -220,9 +220,8 @@ def list_extensions():
requirement_met = False
break

if not requirement_met:
continue

is_builtin = dirname == extensions_builtin_dir
extension = Extension(name=dirname, path=path, enabled=dirname not in shared.opts.disabled_extensions, is_builtin=is_builtin)
extension = Extension(name=dirname, path=path,
enabled=dirname not in shared.opts.disabled_extensions and requirement_met,
is_builtin=is_builtin)
extensions.append(extension)
4 changes: 2 additions & 2 deletions modules/scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -434,8 +434,8 @@ def list_scripts(scriptdirname, extension, *, include_extensions=True):
try:
ordered_script = sorter.static_order()
except CycleError:
errors.report(f"Cycle detected in script dependencies. Scripts will load in ascending order.", exc_info=True)
ordered_script = [x for x in script_dependency_map.keys()]
errors.report("Cycle detected in script dependencies. Scripts will load in ascending order.", exc_info=True)
ordered_script = script_dependency_map.keys()

for script_filename in ordered_script:
script_data = script_dependency_map[script_filename]
Expand Down

0 comments on commit db48f6d

Please sign in to comment.