diff --git a/aaaaaa/traceback.py b/aaaaaa/traceback.py index 3f7e44a..4119a9b 100644 --- a/aaaaaa/traceback.py +++ b/aaaaaa/traceback.py @@ -133,7 +133,7 @@ def get_table(title: str, data: dict[str, Any]) -> Table: table.add_column("Value") for key, value in data.items(): if not isinstance(value, str): - value = repr(value) + value = repr(value) # noqa: PLW2901 table.add_row(key, value) return table diff --git a/aaaaaa/ui.py b/aaaaaa/ui.py index e4efb54..d7b5391 100644 --- a/aaaaaa/ui.py +++ b/aaaaaa/ui.py @@ -369,7 +369,7 @@ def mask_preprocessing(w: Widgets, n: int, is_img2img: bool): ) -def inpainting(w: Widgets, n: int, is_img2img: bool, webui_info: WebuiInfo): +def inpainting(w: Widgets, n: int, is_img2img: bool, webui_info: WebuiInfo): # noqa: PLR0915 eid = partial(elem_id, n=n, is_img2img=is_img2img) with gr.Group(): diff --git a/adetailer/common.py b/adetailer/common.py index f9e42fc..0a4fb7a 100644 --- a/adetailer/common.py +++ b/adetailer/common.py @@ -163,7 +163,7 @@ def create_bbox_from_mask( """ bboxes = [] for mask in masks: - mask = mask.resize(shape) + mask = mask.resize(shape) # noqa: PLW2901 bbox = mask.getbbox() if bbox is not None: bboxes.append(list(bbox)) diff --git a/controlnet_ext/controlnet_ext.py b/controlnet_ext/controlnet_ext.py index bcf7130..6fb557e 100644 --- a/controlnet_ext/controlnet_ext.py +++ b/controlnet_ext/controlnet_ext.py @@ -49,7 +49,7 @@ class ControlNetExt: models = self.external_cn.get_models() self.cn_models.extend(m for m in models if cn_model_regex.search(m)) - def update_scripts_args( + def update_scripts_args( # noqa: PLR0913 self, p, model: str, diff --git a/controlnet_ext/controlnet_ext_forge.py b/controlnet_ext/controlnet_ext_forge.py index ef59e32..5fba119 100644 --- a/controlnet_ext/controlnet_ext_forge.py +++ b/controlnet_ext/controlnet_ext_forge.py @@ -45,7 +45,7 @@ class ControlNetExt: def init_controlnet(self): self.cn_available = True - def update_scripts_args( + def update_scripts_args( # noqa: PLR0913 self, p, model: str, diff --git a/pyproject.toml b/pyproject.toml index 87f609f..cd3a2fb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,6 +56,7 @@ select = [ "N", "PD", "PERF", + "PL", "PIE", "PT", "PTH", @@ -67,7 +68,7 @@ select = [ "UP", "W", ] -ignore = ["B905", "E501"] +ignore = ["B905", "E501", "PLR2004", "PLW0603"] unfixable = ["F401"] [tool.ruff.lint.isort] diff --git a/scripts/!adetailer.py b/scripts/!adetailer.py index 52141e5..22f3190 100644 --- a/scripts/!adetailer.py +++ b/scripts/!adetailer.py @@ -745,7 +745,7 @@ class AfterDetailerScript(scripts.Script): return optimal_resolution - def fix_p2( + def fix_p2( # noqa: PLR0913 self, p, p2, pp: PPImage, args: ADetailerArgs, pred: PredictOutput, j: int ): seed, subseed = self.get_seed(p)