Repository navigation
Conversation
- Create .pre-commit-config.yaml with Ruff (Python), ESLint (JavaScript), and formatting hooks - Fix F811 errors in modules/processing.py by removing duplicate field definitions - Remove sd_model field (replaced by @Property) - Remove mask_blur field (replaced by @Property) - Run ruff-format across codebase for consistent Python formatting Enables code quality checks on every commit with pre-commit framework. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
# Conflicts: # modules/api/api.py # modules/cmd_args.py # modules/extras.py # modules/hashes.py # modules/images.py # modules/launch_utils.py # modules/modelloader.py # modules/processing.py # modules/scripts_auto_postprocessing.py # modules/scripts_postprocessing.py # modules/sd_disable_initialization.py # modules/sd_hijack_optimizations.py # modules/sd_models.py # modules/sd_schedulers.py # modules/shared_options.py # modules/textual_inversion/textual_inversion.py # modules/ui_components.py # modules/ui_extra_networks.py # modules/ui_loadsave.py # modules/upscaler.py # scripts/postprocessing_codeformer.py # scripts/postprocessing_gfpgan.py # scripts/postprocessing_upscale.py # scripts/xyz_grid.py
Fix the test-server startup regression by restoring the names re-exported from modules.paths. Several modules and builtin extension preload scripts import data_path/models_path and related values from modules.paths; dropping those imports caused CI startup to fail before tests ran. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The CPU test job reached web UI startup after the paths.py fix but then failed because modules.shared no longer re-exported the paths_internal values used by startup code. Restore the original re-exports so shared.sd_configs_path, shared.models_path, and related attributes remain available. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The CPU test job now starts the app far enough to build the extensions UI, but that code still expects modules.ui.wrap_gradio_call to exist via the ui module's call_queue imports. Restore that import so the test server can finish starting. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The earlier lint cleanup removed StableDiffusionProcessing dataclass fields that used to accept sd_model and mask_blur constructor arguments. Startup now works, but API and UI call sites were still passing those legacy kwargs, causing 500s in txt2img/img2img tests. Stop passing sd_model explicitly and map mask_blur to mask_blur_x/mask_blur_y. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add explicit __all__ exports for the re-exported names in modules.paths, modules.shared, and modules.ui so Ruff no longer removes or flags the imports that other modules access through those module namespaces. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
.pre-commit-config.yamlto enable automated code quality checks on every commitmodules/processing.pyby removing duplicate field definitions that were shadowed by propertiesThis PR establishes a development workflow where contributors automatically run linters and formatters before each commit, improving code consistency and reducing CI failures.
Changes
.pre-commit-config.yaml- Configures Ruff (linting/formatting) and ESLint (JS linting) with ESLint v8 for.eslintrc.jscompatibilitymodules/processing.py- Removed duplicatesd_modelandmask_blurfield definitions that conflicted with their @Property decoratorsChecklist: